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

Kendo UI Grid - AngularJS

1 Answer 100 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dirk
Top achievements
Rank 1
Dirk asked on 06 Mar 2014, 02:01 PM
Hi

I'm evaluating the Kendo UI Web Grid. I want to make a column read-only and found a solution in the Telerik Forums, telling me to set the editable-property of that column to false in my js-file through the schema-model-fields-collection.
I've tried it and it works.
But I'm using AngularJS and want to configure this UI-concern directly in my html, rather then injecting this configuration into my angular-controller (seperation of concerns is a very important topic for me).
Is there a way to configure this readonly setting directly in my html-page?
I've tried it in the html-page, but the following html-snippet does not put the Id-column in the desired readonly state.

                    <div kendo-grid k-data-source="products" 
                         k-selectable = "'multiple'"
                         k-editable = true
                         k-navigatable = true
                         k-columns='[
                            { "field": "productId", "title": "ID", "width": 100, "editable": false},
                            { "field": "productName", "title": "Artikel"},
                            { "field": "productDescription", "title": "Omschrijving" }
                          ]'>
                    </div>

Many thanks in advance.

Dirk Schelfaut
Belgium

1 Answer, 1 is accepted

Sort by
0
Mihai
Telerik team
answered on 07 Mar 2014, 10:26 AM
Hi,

The grid does not support an "editable" property in the column description objects, so the editable: false that you pass to the column has no effect.

As you said yourself, you must set the editable: false in the field description from schema/model/fields.  That means you should include the whole dataSource definition in the HTML, which I think is inconvenient, but if you wish to do so it should work.

Regards,
Mihai
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
Dirk
Top achievements
Rank 1
Answers by
Mihai
Telerik team
Share this question
or