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

[Solved] Grid Checkbox column editing gets disabled when bound to IEnumerable list of items

1 Answer 55 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ramachandran
Top achievements
Rank 1
Ramachandran asked on 15 Oct 2010, 05:43 AM
Hi,

         When I try to bind the mvc 2.0 grid to an IEnumerable list of models the checkbox column gets disabled. I have attached a sample application which demonstrates this. Please advise on how to proceed.

Kind Regards,

Ram

1 Answer, 1 is accepted

Sort by
0
Ramachandran
Top achievements
Rank 1
answered on 21 Oct 2010, 07:36 AM
Hi,

              I got this issue resolved by using the following code:

                                 columns.Template(o => "<input type='checkbox' " + (o.Active ? "checked='checked'" : "") + "/>");

Kind Regards,

Ram
Tags
Grid
Asked by
Ramachandran
Top achievements
Rank 1
Answers by
Ramachandran
Top achievements
Rank 1
Share this question
or