We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Record Number in Grid

How do I display the record number for each record in a grid. I now about the ShowNavigationBar property but would lke each record to be numbered

2 Replies

AD Administrator Syncfusion Team June 10, 2004 01:56 PM

Hi Jason, You could do this with an unbound column. The CustomSummary example shows how to add an unbound field (the CustomCounter in that sample). In the unboundField_QueryValue method you can then set the record index: private void unboundField_QueryValue(object sender, FieldValueEventArgs e) { if (e.Record is AddNewRecord) return; if (e.Field.Name == "Record") e.Value = e.Record.ParentTable.Records.IndexOf(Record); else if (e.Field.Name == "UnsortedRecord") e.Value = e.Record.ParentTable.UnsortedRecords.IndexOf(Record); } Stefan


AD Administrator Syncfusion Team June 11, 2004 03:47 AM

Thanks again Stefan, that''s exactly what I need ;-) Jason

Loader.
Live Chat Icon For mobile
Up arrow icon