PC Review


Reply
Thread Tools Rate Thread

BindingSources, BindingNavigators and direct navigation...

 
 
Rafael Soteldo
Guest
Posts: n/a
 
      25th Apr 2008
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
 
Reply With Quote
 
 
 
 
Cor Ligthert[MVP]
Guest
Posts: n/a
 
      25th Apr 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" <(E-Mail Removed)> schreef in
bericht news:912041F5-77F2-4CA2-8407-(E-Mail Removed)...
> 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


 
Reply With Quote
 
Rafael Soteldo
Guest
Posts: n/a
 
      25th Apr 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" <(E-Mail Removed)> schreef in
> bericht news:912041F5-77F2-4CA2-8407-(E-Mail Removed)...
> > 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

>

 
Reply With Quote
 
Rafael Soteldo
Guest
Posts: n/a
 
      25th Apr 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" <(E-Mail Removed)> schreef in
> bericht news:912041F5-77F2-4CA2-8407-(E-Mail Removed)...
> > 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

>

 
Reply With Quote
 
Rafael Soteldo
Guest
Posts: n/a
 
      29th Apr 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" <(E-Mail Removed)> wrote in message
> news:912041F5-77F2-4CA2-8407-(E-Mail Removed)...
> > 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

>
>

 
Reply With Quote
 
Rafael Soteldo
Guest
Posts: n/a
 
      29th Apr 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" <(E-Mail Removed)> wrote in message
> news:912041F5-77F2-4CA2-8407-(E-Mail Removed)...
> > 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

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Flip Datasources / bindingsources on the fly Miro Microsoft VB .NET 8 27th Jan 2009 07:33 PM
Direct navigation to specific rows in a DataSource... Rafael Soteldo Microsoft ADO .NET 7 27th Apr 2008 01:24 AM
Need direct navigation to a row in a BindingSource Rafael Soteldo Microsoft Dot NET 0 22nd Apr 2008 11:47 PM
Possible to prevent direct navigation to a page? =?Utf-8?B?QmVu?= Microsoft C# .NET 3 26th May 2006 01:35 PM
multiple BindingNavigators on a single Form? =?Utf-8?B?aGVyYmVydA==?= Microsoft Dot NET Framework Forms 0 30th Jan 2006 01:10 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:58 AM.