kendo grid dropdownlist editor template blank after postback - kendo-ui

On Asp.Net MVC page, grid has two column of drop down editor template.
On Load, it works fine. I can see the dropdown populated with values.
After postback, the drop down list is getting empty/blank.
Editor template are placed under Views/Shared/EditorTemplates.
How to retain values dropdown values after postback?

Data for Editor template comes from view data. So I refilled the view data info on the POST method.

Related

How to read datasource of a Kendo DropDownList only once?

(MVC Razor) So on my page I have a Kendo grid which contains a DropDownList within a certain column. Now I don't want to fill data of my dropdownlist from controller (With Viewbag/ViewData) before the page loads because it would slow it down, but instead I'd like to fill the DropDownList data on user click with a call to a controller function, and call the read method only once(on first click). How would I be able to achieve this goal?
Set autoBind property to false. It will cause that dropdown will not be filled by data before user click on it.
After component is initialized dataBound event is started so you can set readonly in it.
Demo here

How to prevent validation from non-selected rows in MVC3

I have a requirement in MVC3. I have a simple form with a gridview with edit, update and delete button.
When I update any record, validation should be fire for only that single row, not for other rows.
Upon clicking edit load a partial view into an Ajax dialog. Validation won't work on that loaded partial view, you'll have to tell jquery validate to parse that new content to validate it ala MVC 3 Razor. Partial View validation is not working

in kendo grid column how to use autocomplete

In a Kendo grid, how to bound the column with auto complete option in MVC web application. Want to display grid product name in autocomplete option. In that option need to bound Product item code and Product Item Name. Have any custom editor in a Kendo grid?
You can find one way on how to do it at How to have an autocomplete field inside kendoUI grid using asp.net mvc wrapper. Basically you will have to create EditorTemplate and reference it from grid.
Hope this helps.

Telerik MVC grid data binding using Stored Procedure

Am using a telerik mvc grid to populate a data by passing the text that the user enters in a HTML textbox. Once the text is entered, I have a button which once we click, it should populate a telerik mvc grid with data (data should come by passing in the text into the stored procedure).
I have the stored proc, I have the controls in place and I want to use ajax binding to get the data from the controller using a view model. Am new to Razor, please help.
Check this demo, I think it is really close to the case you explained.
http://demos.telerik.com/aspnet-mvc/Grid/Filtering?theme=vista

Create a Web Grid using Javascript

Can we create a WEB GRID dynamically using JAVASCRIPT ?
I am using MVC 3 and Razor as my view.
On one of my Razor view I have a drop down box what I want is to create a web grid dynamically on selection of a drop down I get the data depending on the value selected from the drop down box.
Please help me on this.
I had to use ajax for this, where I had called a method using ajax and my method (present in the controller) returned a partial view.
My partial view had the grid I needed to show. and in the method (present in the controller) I had passed value from the dropdown box using ajax, and using this value I had queried my database and sent that model to the partial view.

Resources