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

ID on a 'Selectable' column

2 Answers 99 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Veteran
Matt asked on 24 Jun 2020, 01:59 PM

Is there a way to assign an ID to a selectable column? Using Test Studio, it is a real challenge without writing code, to identify which columns was clicked as when you have multiple rows, they all have no ID (or any other way to identify them). Having an ID would fix that and if these columns would actually allow a template - which it seems they do not - we could do other nice things, icluding IDs

 

Matt

2 Answers, 1 is accepted

Sort by
0
Tsvetomir
Telerik team
answered on 26 Jun 2020, 11:36 AM

Hi Matt,

In general, the selectable column is not a bound column and it is not supported to handle and store data of any kind. Also, in the context of its functionality having the ID attribute set is not needed. However, an ID can be assigned after the initialization of the grid - in the DataBound event handler. Here is an example:

https://dojo.telerik.com/oVOzEPUJ

An alternative is to handle the Change event of the grid. It is triggered after the selection of the row. Or, you can create a template column that will programmatically select/deselect the rows.

I am not completely sure what are the limitations you are facing with the code. Can you elaborate more on the same so that I can think of a suggestion accordingly?

 

Kind regards,
Tsvetomir
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Matt
Top achievements
Rank 1
Veteran
answered on 30 Jun 2020, 07:47 PM

Perfect, thanks, that worked for me :-)

 

Matt

Tags
Grid
Asked by
Matt
Top achievements
Rank 1
Veteran
Answers by
Tsvetomir
Telerik team
Matt
Top achievements
Rank 1
Veteran
Share this question
or