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

Grid rows read only

3 Answers 35 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jim
Top achievements
Rank 1
Jim asked on 09 Jul 2015, 11:18 PM
If i set a Grid to be model binded, i can no longer check/uncheck the template checkbox columns , is this correct behaviour? when i inspect the checkbox column it has been set as disabled somehow.

3 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 10 Jul 2015, 09:04 AM

Hello Jim,

From the provided information we are not sure what is the exact reason for the issue. Could you demonstrate it with small isolated runnable example that we could inspect locally?

Regards,
Dimiter Madjarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Jim
Top achievements
Rank 1
answered on 10 Jul 2015, 02:58 PM

the example consists of a partial view with a fluent api generated grid that is binded to a model, the datasource is set to server.

 

then the partial view is rendered in a main view based on a button click and data load. 

One thing is to make a template column like i did:

 

@(Html.Kendo().Grid(Model.AllCamps)
                .Name("grdAccountCamps")
                .Columns(col =>
                  {
                      col.Bound(p => p.Selected).HtmlAttributes(new { @style = "padding-left: 5px;" }).ClientTemplate("<input @(item.Selected ? \"checked='checked'\" : \"\")  value='selected' type='checkbox' />");
                      col.Bound(p => p.CampCode).HtmlAttributes(new { @style = "padding-left: 8px;" });
                      col.Bound(p => p.CampName).Title("Account Users").HtmlAttributes(new { @style = "padding-left: 5px;" });
                  })                 
                                     .Navigatable()
                                     .Selectable(select=> select.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
                                                    .Scrollable(src => src.Height(260))                                            
        .DataSource(dataSource => dataSource
            .Server()
                                                      .Model(model => model.Id(p => p.CampID))      
                                                      )

 

 

0
Dimiter Madjarov
Telerik team
answered on 13 Jul 2015, 08:19 AM

Hello Jim,

In order to assist we would need an isolated runnable example that we could inspect on our end in order to reproduce the issue. If the problem is still reproducing, please provide such example, so we could debug it.

Regards,
Dimiter Madjarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Jim
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Jim
Top achievements
Rank 1
Share this question
or