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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Record Number in Grid

Thread ID:





15055 Jun 10,2004 12:44 PM UTC Jun 11,2004 07:47 AM UTC WinForms 2
Tags: Grouping
Jason Hales
Asked On June 10, 2004 12:44 PM UTC

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

Administrator [Syncfusion]
Replied On June 10, 2004 05:56 PM UTC

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

Administrator [Syncfusion]
Replied On June 11, 2004 07:47 AM UTC

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


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon