Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

VS 2010 BindingSource Filter and row position

$
0
0
If I place a filter on my binding source as in:

Code:

ProjectsBindingSource.Filter = String.Format("BidID={0}", BidID)
Given that the BidID Column is set to no duplicates, so it is unique. I'm saying there will only be one record per BidID

Does the filter return only one record?

So what I'm trying to do is get the current row from the dataset. And because the datasets binding source is filtered I would think the only row should have a index of 0. but that's not how it works apparently.

Code:

Me.FrontPhotoPictureBox.Image = Image.FromFile(ErvDataDataSet.Tables("Projects").Rows _
                                                                (16).Item("FrontPhoto").ToString)

As you can see FrontPhoto is the column I get data from. However trying to get the row index of the current record is what I'm have problems with.
I see that the bindingsource has the correct index but how to access it?

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>