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

Kendo UI Web MVC Grid Control with Dropdown control in View mode

1 Answer 119 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Narender
Top achievements
Rank 1
Narender asked on 11 Nov 2013, 02:13 AM
Hi...

     Iam currently working on Kendo UI MVC Grid and have a couple of requirements mentioned below:

     1) Kendo grid with a dropdown column in the view mode, i mean its not like the dropdown we see in the edit mode.
     2) Dropdown in the grid should be filtered and loaded based on a row primary key data, it should make an ajax call to controller and populate the drop down after data filter.

I tried using the client template and foreign key columns, both the features only give dropdown in the edit mode and the data in the dropdown is loaded on Grid initialization and stored in view data, so no more hits to server after that. I couldn't find any sources for these couple of requirements i have.
It would be great if i can get some code snippets.
Thanks in advance...
-Naren

1 Answer, 1 is accepted

Sort by
0
Accepted
Petur Subev
Telerik team
answered on 13 Nov 2013, 07:26 AM
Hello Nerender,

We do not recommend using a work-around to display a DropDownList in the column in display mode, it creates many problems that are hard to handle. However I prepared a small sample project that demonstrates a way to achieve it.

However please notice the data in the example is coming straight from the server, and there is no additional request performed when opening the DropDownList. Also filtering on such column is not supported, if you use ForeignKey column then you will enter edit mode when you click in the cell and you cannot prevent this because if you make the field readonly then you wont be able to update it even in with the display mode DropDownList.

In conclusion we suggest you to stick with the ForeignKey / Custom editor approaches.

Kind Regards,
Petur Subev
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
Narender
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or