Hi there:

I dragged several fields from a Data Source to a form in the designer. It
created several TextBoxes and a BindingNavigator bound to a BindingSource
which DataSource is the DataTable containing those fields.

Now I'm able to navigate through the table to next, previous, last, ...

Here's the problem:

I want the TextBoxes show a specific row in the DataTable, say a row with
the Name field = "J Lo" (in a DataTable "People"), without having the user
navigating through several rows up until he finds this one.

How do I position the BindingSource to that specific row, if I don't know
it's relative position in the DataTable bound to the BindingSource?. The
DataTable doesn't have a CurrencyManager as the BindingSource does, and the
BindingSource doesn't have a Find method to locate specific rows.

Please help...
--

Rafael Soteldo

Re: BindingSources, BindingNavigators and direct navigation... by Cor

Cor
Fri Apr 25 11:56:22 CDT 2008


Rafael,

Please do not open new messages for open qeustions. Your reply was wrong.

As you don't get an answer from somebody else, than you create only
confusion with open new message threads.

And as policy in most newsgroups. People stop answering you.

Cor

"Rafael Soteldo" <RafaelSoteldo@discussions.microsoft.com> schreef in
bericht news:912041F5-77F2-4CA2-8407-84F073AF35DE@microsoft.com...
> Hi there:
>
> I dragged several fields from a Data Source to a form in the designer. It
> created several TextBoxes and a BindingNavigator bound to a BindingSource
> which DataSource is the DataTable containing those fields.
>
> Now I'm able to navigate through the table to next, previous, last, ...
>
> Here's the problem:
>
> I want the TextBoxes show a specific row in the DataTable, say a row with
> the Name field = "J Lo" (in a DataTable "People"), without having the user
> navigating through several rows up until he finds this one.
>
> How do I position the BindingSource to that specific row, if I don't know
> it's relative position in the DataTable bound to the BindingSource?. The
> DataTable doesn't have a CurrencyManager as the BindingSource does, and
> the
> BindingSource doesn't have a Find method to locate specific rows.
>
> Please help...
> --
>
> Rafael Soteldo


Re: BindingSources, BindingNavigators and direct navigation... by RafaelSoteldo

RafaelSoteldo
Fri Apr 25 13:37:02 CDT 2008

OK. Sorry...
--

Rafael Soteldo


"Cor Ligthert[MVP]" wrote:

>
> Rafael,
>
> Please do not open new messages for open qeustions. Your reply was wrong.
>
> As you don't get an answer from somebody else, than you create only
> confusion with open new message threads.
>
> And as policy in most newsgroups. People stop answering you.
>
> Cor
>
> "Rafael Soteldo" <RafaelSoteldo@discussions.microsoft.com> schreef in
> bericht news:912041F5-77F2-4CA2-8407-84F073AF35DE@microsoft.com...
> > Hi there:
> >
> > I dragged several fields from a Data Source to a form in the designer. It
> > created several TextBoxes and a BindingNavigator bound to a BindingSource
> > which DataSource is the DataTable containing those fields.
> >
> > Now I'm able to navigate through the table to next, previous, last, ...
> >
> > Here's the problem:
> >
> > I want the TextBoxes show a specific row in the DataTable, say a row with
> > the Name field = "J Lo" (in a DataTable "People"), without having the user
> > navigating through several rows up until he finds this one.
> >
> > How do I position the BindingSource to that specific row, if I don't know
> > it's relative position in the DataTable bound to the BindingSource?. The
> > DataTable doesn't have a CurrencyManager as the BindingSource does, and
> > the
> > BindingSource doesn't have a Find method to locate specific rows.
> >
> > Please help...
> > --
> >
> > Rafael Soteldo
>

Re: BindingSources, BindingNavigators and direct navigation... by RafaelSoteldo

RafaelSoteldo
Fri Apr 25 13:43:03 CDT 2008

I just thought that I needed to rephrase the question in a more clearer way...
--

Rafael Soteldo


"Cor Ligthert[MVP]" wrote:

>
> Rafael,
>
> Please do not open new messages for open qeustions. Your reply was wrong.
>
> As you don't get an answer from somebody else, than you create only
> confusion with open new message threads.
>
> And as policy in most newsgroups. People stop answering you.
>
> Cor
>
> "Rafael Soteldo" <RafaelSoteldo@discussions.microsoft.com> schreef in
> bericht news:912041F5-77F2-4CA2-8407-84F073AF35DE@microsoft.com...
> > Hi there:
> >
> > I dragged several fields from a Data Source to a form in the designer. It
> > created several TextBoxes and a BindingNavigator bound to a BindingSource
> > which DataSource is the DataTable containing those fields.
> >
> > Now I'm able to navigate through the table to next, previous, last, ...
> >
> > Here's the problem:
> >
> > I want the TextBoxes show a specific row in the DataTable, say a row with
> > the Name field = "J Lo" (in a DataTable "People"), without having the user
> > navigating through several rows up until he finds this one.
> >
> > How do I position the BindingSource to that specific row, if I don't know
> > it's relative position in the DataTable bound to the BindingSource?. The
> > DataTable doesn't have a CurrencyManager as the BindingSource does, and
> > the
> > BindingSource doesn't have a Find method to locate specific rows.
> >
> > Please help...
> > --
> >
> > Rafael Soteldo
>

Re: BindingSources, BindingNavigators and direct navigation... by RobinS

RobinS
Sat Apr 26 22:36:41 CDT 2008

The binding source does, indeed, have a Find method. Here's an example of
how to use it:

int index = myBindingSource.Find("CompanyName", myCompanyName);
if (index <> -1)
myBindingSource.Position = index;

RobinS.
GoldMail.com

"Rafael Soteldo" <RafaelSoteldo@discussions.microsoft.com> wrote in message
news:912041F5-77F2-4CA2-8407-84F073AF35DE@microsoft.com...
> Hi there:
>
> I dragged several fields from a Data Source to a form in the designer. It
> created several TextBoxes and a BindingNavigator bound to a BindingSource
> which DataSource is the DataTable containing those fields.
>
> Now I'm able to navigate through the table to next, previous, last, ...
>
> Here's the problem:
>
> I want the TextBoxes show a specific row in the DataTable, say a row with
> the Name field = "J Lo" (in a DataTable "People"), without having the user
> navigating through several rows up until he finds this one.
>
> How do I position the BindingSource to that specific row, if I don't know
> it's relative position in the DataTable bound to the BindingSource?. The
> DataTable doesn't have a CurrencyManager as the BindingSource does, and
> the
> BindingSource doesn't have a Find method to locate specific rows.
>
> Please help...
> --
>
> Rafael Soteldo


Re: BindingSources, BindingNavigators and direct navigation... by RafaelSoteldo

RafaelSoteldo
Mon Apr 28 19:08:00 CDT 2008

Excelent!

I didn't see it. I'll try it!

Thank you
--

Rafael Soteldo


"RobinS" wrote:

> The binding source does, indeed, have a Find method. Here's an example of
> how to use it:
>
> int index = myBindingSource.Find("CompanyName", myCompanyName);
> if (index <> -1)
> myBindingSource.Position = index;
>
> RobinS.
> GoldMail.com
>
> "Rafael Soteldo" <RafaelSoteldo@discussions.microsoft.com> wrote in message
> news:912041F5-77F2-4CA2-8407-84F073AF35DE@microsoft.com...
> > Hi there:
> >
> > I dragged several fields from a Data Source to a form in the designer. It
> > created several TextBoxes and a BindingNavigator bound to a BindingSource
> > which DataSource is the DataTable containing those fields.
> >
> > Now I'm able to navigate through the table to next, previous, last, ...
> >
> > Here's the problem:
> >
> > I want the TextBoxes show a specific row in the DataTable, say a row with
> > the Name field = "J Lo" (in a DataTable "People"), without having the user
> > navigating through several rows up until he finds this one.
> >
> > How do I position the BindingSource to that specific row, if I don't know
> > it's relative position in the DataTable bound to the BindingSource?. The
> > DataTable doesn't have a CurrencyManager as the BindingSource does, and
> > the
> > BindingSource doesn't have a Find method to locate specific rows.
> >
> > Please help...
> > --
> >
> > Rafael Soteldo
>
>

Re: BindingSources, BindingNavigators and direct navigation... by RafaelSoteldo

RafaelSoteldo
Mon Apr 28 19:20:01 CDT 2008

Thank you RobinS,

It was there in front of my eyes, and I didn't notice. I think that's
because I'm a newbie.

Thank you very much!!
--

Rafael Soteldo


"RobinS" wrote:

> The binding source does, indeed, have a Find method. Here's an example of
> how to use it:
>
> int index = myBindingSource.Find("CompanyName", myCompanyName);
> if (index <> -1)
> myBindingSource.Position = index;
>
> RobinS.
> GoldMail.com
>
> "Rafael Soteldo" <RafaelSoteldo@discussions.microsoft.com> wrote in message
> news:912041F5-77F2-4CA2-8407-84F073AF35DE@microsoft.com...
> > Hi there:
> >
> > I dragged several fields from a Data Source to a form in the designer. It
> > created several TextBoxes and a BindingNavigator bound to a BindingSource
> > which DataSource is the DataTable containing those fields.
> >
> > Now I'm able to navigate through the table to next, previous, last, ...
> >
> > Here's the problem:
> >
> > I want the TextBoxes show a specific row in the DataTable, say a row with
> > the Name field = "J Lo" (in a DataTable "People"), without having the user
> > navigating through several rows up until he finds this one.
> >
> > How do I position the BindingSource to that specific row, if I don't know
> > it's relative position in the DataTable bound to the BindingSource?. The
> > DataTable doesn't have a CurrencyManager as the BindingSource does, and
> > the
> > BindingSource doesn't have a Find method to locate specific rows.
> >
> > Please help...
> > --
> >
> > Rafael Soteldo
>
>

Re: BindingSources, BindingNavigators and direct navigation... by RobinS

RobinS
Tue Apr 29 01:33:40 CDT 2008

No problem. There's a lot of info about the BindingSource in Brian Noyes's
book on data binding. Great book.

RobinS.
GoldMail.com

"Rafael Soteldo" <RafaelSoteldo@discussions.microsoft.com> wrote in message
news:A9FE52DE-2B65-46C8-B51A-0A5B61D9AC30@microsoft.com...
> Thank you RobinS,
>
> It was there in front of my eyes, and I didn't notice. I think that's
> because I'm a newbie.
>
> Thank you very much!!
> --
>
> Rafael Soteldo
>
>
> "RobinS" wrote:
>
>> The binding source does, indeed, have a Find method. Here's an example of
>> how to use it:
>>
>> int index = myBindingSource.Find("CompanyName", myCompanyName);
>> if (index <> -1)
>> myBindingSource.Position = index;
>>
>> RobinS.
>> GoldMail.com
>>
>> "Rafael Soteldo" <RafaelSoteldo@discussions.microsoft.com> wrote in
>> message
>> news:912041F5-77F2-4CA2-8407-84F073AF35DE@microsoft.com...
>> > Hi there:
>> >
>> > I dragged several fields from a Data Source to a form in the designer.
>> > It
>> > created several TextBoxes and a BindingNavigator bound to a
>> > BindingSource
>> > which DataSource is the DataTable containing those fields.
>> >
>> > Now I'm able to navigate through the table to next, previous, last, ...
>> >
>> > Here's the problem:
>> >
>> > I want the TextBoxes show a specific row in the DataTable, say a row
>> > with
>> > the Name field = "J Lo" (in a DataTable "People"), without having the
>> > user
>> > navigating through several rows up until he finds this one.
>> >
>> > How do I position the BindingSource to that specific row, if I don't
>> > know
>> > it's relative position in the DataTable bound to the BindingSource?.
>> > The
>> > DataTable doesn't have a CurrencyManager as the BindingSource does, and
>> > the
>> > BindingSource doesn't have a Find method to locate specific rows.
>> >
>> > Please help...
>> > --
>> >
>> > Rafael Soteldo
>>
>>