Hi, I would like to be able to display the rownumber in my gridview. I want to use this as a displayable sequence. Is there a way that I can display this?
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
I like to be able to display row number on the row header. I was able to pull this off, but the numbers are not always display in right order when 1000 of row are loaded. (see the attached image) I put the blow code in RowLoaded event of the grid.
Please advice if there is any sophisticated way to do this.
Thanks,
Amit
var border = gridViewRow.ChildrenOfType<Border>() .Where(b => b.Name == "PART_IndicatorPresenter") .FirstOrDefault(); if (border != null) { var innerBorder = border.Child asBorder; if (innerBorder != null && !(innerBorder.Child isTextBlock)) { var textBlock = newTextBlock(); textBlock.TextAlignment = TextAlignment.Center; textBlock.VerticalAlignment = VerticalAlignment.Center; textBlock.Text = (_target.Items.IndexOf(gridViewRow.Item) + 1).ToString(); innerBorder.Child = textBlock; }