al salam alykom
السلام عليكم
peace upon with you
_________________________
i found a solve for this trick
follow the steps if you deal with the data like this way
first you regally have a connection to some database
2- you got this data into datatable to the datagrid view
like that
con as connection
cmd as command
dr as datareader
tb1 as datatable
now you opened the connection
and put the data into the data table like that
cmdon.Connection = cn
cmdon.CommandType = CommandType.Text
cmdon.CommandText = "Select * from table "
dr = cmd.ExecuteReader
tb1.Clear()
DataGridView1.DataSource = tb1
tb1.Load(drgrid)
DataGridView1.DataSource = tb1
it'll work with you