how to update datagrid

  • Thread starter Thread starter amritac20 chaudhuri via .NET 247
  • Start date Start date
A

amritac20 chaudhuri via .NET 247

(Type your message here)
i am trying to create tables in sql server programmatically invb.net.i can add fields and update them programmatically. i needto know how i can update the table records when displayed indatagrid.i want to update the datagrid/records as it is done inaccess.need to know how to get count of number of rows filled indatagrid.plzzz help!!
 
If it's a datagrid in Win app, you can use the datagrid's underlying
datasource, e.g. datatable to get row count.

DataTable tbl = (DataTable)datagrid.DataSource;
int rowCount = tbl.Rows.Count;

If it’s a datagrid in Web app, you can get it’s row count by

int rowCount = datagrid.Items.Count;

HTH

Elton Wang
(e-mail address removed)
 
Back
Top