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

Index from attribute

0 Answers 37 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Justin
Top achievements
Rank 1
Justin asked on 09 Feb 2012, 06:45 PM
On day two of playing around with Kendo.  So far, having a lot of fun, seem's that once I learn all the little tricks it could make development very fast.

Anyway, a query or suggestion.  I am retrieving a slew of <input class="drop-selector> (which exist as a column in a grid[created via a column template]) using $(".drop-selector) and calling kendoDropDownList to turn this into a list. (doing this on the dataBound event of the grid)

Then i'm currently having to iterate through this result(.each) and set the initial drop-down index.  I can't help but think there should be an easier way.

One thing that came to mind was wouldn't it be nice to set an attribute in the initial input node(ie... <input index="2">) and have Kendo automatically set that if the index option wasn't specified in the kendoDropDownList constructor.

Anyway, feel free to correct me if there is an easier way to do what I want!

Justin

No answers yet. Maybe you can help?

Tags
DropDownList
Asked by
Justin
Top achievements
Rank 1
Share this question
or