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

Radgrid Checkbox selection in multiple columns

1 Answer 199 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Zain
Top achievements
Rank 1
Zain asked on 11 Oct 2016, 09:26 AM

Hi

How to get checkbox input in multiple auto generated columns ? picture attached for understanding.

Few points there

- number of columns of grid are dynamic depending upon dates filter selection of user. (start date, end date). so i use auto generate columns option to  implement it. is there any better approach for this? 

- can i  make clientcheckboxcolumn autogenerated ? i have gone through many articles in the forum related to clientcheckboxcolumn selection. 

- is there any better solution for implementation of this task ? 

Regards,

Zain

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 14 Oct 2016, 05:28 AM
Hello Zain,

You have 2 options to create boolean columns:

1. GridCheckBoxColumn:
You can use ItemCreated or ItemDataBound event handler to access the generated checkbox controls:
http://www.telerik.com/help/aspnet-ajax/grid-distinguish-differences-between-itemcreated-itemdatabound.html

And enable them explicitly:
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/rows/accessing-cells-and-rows

2. GridTemplateColumn:
Check the sample at the end of the following section:
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/columns/column-types#gridtemplatecolumn

You can also create template columns programmatically:
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/defining-structure/creating-a-radgrid-programmatically#creating-template-columns-programmatically

I hope this will prove helpful.

Regards,
Eyup
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Grid
Asked by
Zain
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or