Try using the OnItemDataBound event
For each item in the dataset, you can increment an integer by 1 and diplay
the result in a label in the datagrid
i.e.
int i = 0;
private void DataGrid1_ItemDataBound(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
i++;
e.Item.FindControl["lbl2"].Text = i.ToString();
}
"BlueHeaven" <an*******@discussions.microsoft.com> wrote in message
news:73****************************@phx.gbl...
Hi all, How to create auto numbering in datagrid if I
show the data from database to datagrid by
using datasource = dataset.
Thanks all