AboutSyed Rizwan Muhammad Rizvi Expertise I can answers questions regarding web based and desktop based programming in VB.Net. Which can include SOAP, XML, Custom Controls, COM Interoperability etc.
Experience Have been working in this specific area for last 2 years previously I was a VB 6 Developer with experties in other languages as well. Total 10 years of programming experience.
I am creating a windows form with a datagrid and multiple textboxes. All of the controls are bound to one dataset so that whenever a user selects a row in the read-only datagrid (I used TableStyles to be able to specify which 4 columns displayed in the grid) the same row would also display in the 30 textboxes for the users to modify details.
The problem starts when I try to refresh the data!! I just need to periodically get another set of data from the database to make sure my dataset has the latest rows, but nothing works! I've tried everything, but the best I've been able to do is Clear() the whole dataset and Fill() and recreate the TableStyle columns (dataGridColumnStyle) and re-Add it to the datagrid. This doesn't sound efficient, and not to mention, I lose the bind to all 30 textboxes!! Is the only solution for me to clear all the textboxes and rebind that as well?
I'd really appreciate any light you can shed on this. I've spent hours searching online through forums for ANY help with no results! By the way, my code is actually in C# and I know your area is VB. I saw a lot of people still use datasets and datagrids in VB, so I was hoping that you could still help me (there are no experts under "Ask an expert C#")
Thanks in advance,
Angie
Answer :) at no experts in C# dont worry I can cater for your C# problems as well.
Did you try fetching only the new rows and adding it to the dataset? and then refreshing the grid would automatically update everything else. Try and let me know what you end up with.