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

MVVM KendoGrid and 1-D arrays

0 Answers 42 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dr.YSG
Top achievements
Rank 2
Dr.YSG asked on 10 Jun 2013, 07:05 PM
I have created an online CodePen Demo: http://codepen.io/DrYSG/pen/wnDxL where I have a Grid bound to a KendoObservable 1-D array. The Array is meant to be (Item, Value) pairs. There are a number of clumsy things here that I would like to clean up.
  • I would love it if you supported Grid's that had Vertical Orientation, so that I could just have display 1-D array, and use the Column Headings for each item: see: http://www.kendoui.com/forums/ui/general-discussions/vertical-grid-property-grid.aspx
  • Doing the lookup for the value and changing it involves hard constants (stateTable[1].Value = foo. Do I have to have a use an index table that translates integers to keys. I.e. var StatusKey = 0, TileCountKey = 1, etc.  (then it would be stateTable[TileCountKey] = 2) Still seems clumsy.
  • This would be especially fragile, if the user could add and delete rows. (batch editing).
  • The KendoObservable.set() is not working for this example. So I am doing a manual trigger, which I saw in a post by Alexander Valchev, but I don't see document anywhere. This also feels a bit clumsy.
  • Why is there a scroll bar on my Grid?
Bottom line. It works now, but I want to know if there is something in KendoUI today, that would make this cleaner, and if not, do you have anything in UserVoice planned to fix this up?

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Dr.YSG
Top achievements
Rank 2
Share this question
or