This is a migrated thread and some comments may be shown as answers.

I have too many data to show. How to index it in the following figure

3 Answers 95 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ricardo
Top achievements
Rank 1
Ricardo asked on 22 Feb 2019, 06:40 AM

Dear All,

I have too many data to show. How to index it in the following figure

When you use a datagridview, it will be automatically added, but how do you do that in RadGridView

Is this possible...

Best regards

3 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 22 Feb 2019, 07:12 AM
Hello Ricardo,

Thank you for writing.

A possible solution is to handle the ViewCellFormatting event and to change the text of the cell element in the indent column according to the row index. We have an article in our documentation demonstrating how this can be achieved: https://docs.telerik.com/devtools/winforms/controls/gridview/cells/formating-examples/row-numbers.

I hope this will help.

Regards,
Hristo
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Ricardo
Top achievements
Rank 1
answered on 22 Feb 2019, 07:37 AM

Dear Hristo,

Thanks for your reply.But not what I wanted

If I don't use the ViewCellFormatting event, is there any other way to achieve this?

Can we do a SubClass to do that?

Because I have so many watches, the workload is too heavy.

Best regards

0
Hristo
Telerik team
answered on 22 Feb 2019, 09:07 AM
Hello Ricardo,

The grid control is virtualized and the cell elements are reused to represent different logical cell objects: 
Currently, this is the preferred approach for adding row indices in the indent column. Handling the event as seen in the documentation article should not in any way impact the performance of the control. 

Regards,
Hristo
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
Ricardo
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Ricardo
Top achievements
Rank 1
Share this question
or