I have been pulling my hair out over this and would appreciate any help!! I have a relational dataset (objdsCompanies) that is displayed and bound on tabpage1. I apply a search on a different tabpage; this creates a second dataset (dsSearch) that holds CompanyName and CompanyID and populates a listbox (realise now after much reading here that this could be a datatable not a DS!). The listbox passes the CompanyID value. What i would like to happen is the listbox item clicked navigates the main tabpage to the selected index (CompanyID is the primary key and is passed on selectedIndexChange), I have tried retrieving the bindingcontext position value of the record to no avail. I can find the row (FindByCompanyID) in the main dataset (objdsCompanies) but as stated i would just like the bound dataset to remain whole (not filtered) and this search function to point to the associated record ie possibly change the position value of the record in objdsCompanies?
I think i may have to iterate through the whole dataset and stop when CompanyID = passed value. Was initially thinking of setting the bindingcontext position value to CompanyID as the initial order on the main tabpage which is (currently) not sorted, but then the navigation functionality increments the .position value so this would not work (I dont think anyway). I thought i had it cracked when I selected the row from the dataset...then query its position value...hmmm, DOH! =0!
I have had a play with dataviews but this functionality filters and is not appropriate here.
Also Im not using datagrids, just textboxes with info like CompanyAddress,CompanyPostcode etc for the main info form/tabpage then have relational bound listboxes that list things like email addresses, reports, URLs and Infringements which are all dynamic dependant on selected CompanyID. It is a little awkward as i am now thinking in SQL as opposed to VB.Net!!
I would appreciate any advice/thoughts, PB
I think i may have to iterate through the whole dataset and stop when CompanyID = passed value. Was initially thinking of setting the bindingcontext position value to CompanyID as the initial order on the main tabpage which is (currently) not sorted, but then the navigation functionality increments the .position value so this would not work (I dont think anyway). I thought i had it cracked when I selected the row from the dataset...then query its position value...hmmm, DOH! =0!
I have had a play with dataviews but this functionality filters and is not appropriate here.
Also Im not using datagrids, just textboxes with info like CompanyAddress,CompanyPostcode etc for the main info form/tabpage then have relational bound listboxes that list things like email addresses, reports, URLs and Infringements which are all dynamic dependant on selected CompanyID. It is a little awkward as i am now thinking in SQL as opposed to VB.Net!!
I would appreciate any advice/thoughts, PB