AllExperts > Experts 
Search      

VB.NET

Volunteer
Answers to thousands of questions
 Home · More Questions · Answer Library  · Encyclopedia ·
More VB.NET Answers
Question Library

Ask a question about VB.NET
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Syed 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.

 
   

You are here:  Experts > Computing/Technology > Basic > VB.NET > Refreshing dataSet

Topic: VB.NET



Expert: Syed Rizwan Muhammad Rizvi
Date: 9/6/2006
Subject: Refreshing dataSet

Question
Dear Syed,

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.

Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.