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

Row Number in GridDataBoundGrid

Is there a way to show row number in the first or the pointer column of the GridDataBoundGrid? Thanks.

1 Reply

AD Administrator Syncfusion Team June 23, 2003 05:30 PM UTC

> Is there a way to show row number in the first or the pointer column of the GridDataBoundGrid? > > Thanks. You can change the row header celltype with grid.Model.BaseStylesMap["Row Header"].StyleInfo.CellType = "Header"; Then it should display the row number in the first (header) column but you loose the pencil/marker. If you need that marker another idea would be to set Model.Cols.HeaderCount = 1 and then handle the PrepareViewStyleInfo and set e.Style.Text = row.ToString(); when e.ColIndex = 1 (whereas 'e' is the event args passed to PrepareViewStyleInfo ) Stefan

Loader.
Live Chat Icon For mobile
Up arrow icon