Click here to Skip to main content
15,899,754 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have passed a query in datareader as dr
I take one datagridview.
when data reader read data then one by one values of dr add in datagridview.
when one row completed then add new row.
again values of dr are one by one add in datagridview
How to do this ?
Posted
Updated 20-Apr-11 19:21pm
v3

1 solution

VB
Dim da As New SqlDataAdapter(cmd)
Dim dt As New DataTable
da.Fill(dt)
MainForm.MyDataGridView.DataSource = dt
Dim ChkBox As New DataGridViewCheckBoxColumn
ChkBox.FlatStyle = FlatStyle.Standard
MainForm.MyDataGridView.Columns.Insert(1, ChkBox)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900