Home
Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
C# Community
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
Database
Database General Discussion
Dataset Navigation - on primary key
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="bobberz" data-source="post: 6779" data-attributes="member: 2617"><p>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? </p><p></p><p>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!</p><p>I have had a play with dataviews but this functionality filters and is not appropriate here. </p><p>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!! </p><p></p><p>I would appreciate any advice/thoughts, PB</p></blockquote><p></p>
[QUOTE="bobberz, post: 6779, member: 2617"] 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 [/QUOTE]
Insert quotes…
Verification
Post reply
Home
Forums
Database
Database General Discussion
Dataset Navigation - on primary key
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top
Bottom