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

Serverside created Schema

1 Answer 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bart
Top achievements
Rank 1
Bart asked on 14 Sep 2012, 09:45 AM
Good day!

In the application we are developing we are using the Kendo grid to show large quantity's of data. We also want to combine this with the edit functionality of the grid. Users can edit the data in the pop-up.

In my test application, this works great. I get a nice pop-up with the edit fields, and the fields that I disabled in the schema are not editable, as they are supposed to be. But when converting this to our application situation we run into some small problems.

The test application where it works can be found here: http://jsfiddle.net/bartfukkink/v8VJA/

In this example, we want our Columns and sorting information to be provided trough an Ajax call. This way, our customers will always have the same layout as they had when they last used the screen. I got working neatly now, using JSON to create a object and use that in the initialisation of the grid.

So far so good. Now I want to also get the Schema information working this way. So I create a schema (ruby - server side ) and get that over correctly. But I just can not get it to use the schema to restrict the editing the user can do.

Does anyone have any documentation that could help with this? Especially in what kind of format the result of the schema should be?

If I supply the schema like this (unparsed JSON) and supply it to the Schema property of the DataSource, this is not used.

{"model":{"id":"test","fields":{"ProductID":{"type":"Number","editable":false},"ProductName":{"type":"String"},"UnitPrice":{"type":"Number"}}}}

Any help would be greatly appriciated.

1 Answer, 1 is accepted

Sort by
0
Bart
Top achievements
Rank 1
answered on 21 Sep 2012, 02:16 PM
Took me a while, but managed to pass along a Model wich is created server-side and picked up at the client side. This way I can let the server side enforce wich fields are editable and wich fields are not. :)
Tags
Grid
Asked by
Bart
Top achievements
Rank 1
Answers by
Bart
Top achievements
Rank 1
Share this question
or