adding serial no column in a bounded data grid

  • Thread starter Thread starter Vikramaditya Singh
  • Start date Start date
V

Vikramaditya Singh

i want to show a serial no column in a data grid which is bounded to a data
table. Is it possible. does datagrid has some property to do this
 
You can use the event named "OnItemDataBound" to create/Add serial numbers to the datagrid rows.

Sub RowSerial(s object, e as DataGridItemEventArgs)
If e.Item.ItemType <> ListItemType.Header Then
' Additon to cell 0 goes here
End If
End sub

Write further if more clarification are required.

Avneesh
 
Back
Top