Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Streaming data to a DataGridView like in Sql Server Management Studio
 

Streaming data to a DataGridView like in Sql Server Management Studio

How do you stream data to a DataGridView so it asynchronously retrieves data from the database and asynchronously updates the datagrid? I wantit to actlikethe datagrid inSql Server management tool that populates data to the grid as it retreives it.I tried the following:

1. Retrieve the data using a SqlDataReader asynchonrously using BeginExecuteReader


2. In the resulting callbackpopulate the DataGridView on another thread using the BackgroundWorker class. This calls adelegate on the mainformthread topopulate the grid usingtheInvoke method.

3. A dataset is then populated using DataSet.Load method.

Thanks,

Mike

Michael Miller  Thursday, March 16, 2006 6:07 PM
hi
Mike
can u give me source code of this example
thanks
arup08  Tuesday, September 01, 2009 9:04 AM

You can use google to search for other answers

Custom Search

More Threads

• How to display the lookup value in a DataGridViewComboBox in view mode
• How do i add new record to DB using detail form - not datagrid?
• How to refresh the DataGridView?
• AddNew() gives wrong value on Unique Identity column
• Populating DataGridView ComboBox
• check dataset for changes
• Bug DataGridView: InvalidArgument=Value of '0' is not valid for 'SelectedIndex'.
• Problem: DataBind() in DataGrid
• StackOverflowException assigning a bitmap to a cell value in DataGridView_CellFormatting
• Get Database definition in C#