Kendo Grid DataSourceRequest Page Filter issue - kendo-ui

I have kendo grid. When I filter in any page, DataSourceRequest shows the default page as 1. I want that if I filter in 2 page, I should see the request as Page 2 in MVC Controller Action Method.

Related

ASP.NET Core send nested list from razor view page to controller action is null?

I am trying to send a sub list called OrderItems EditOrderViewModel from a razor view page view page to controller action Post Action method but I always get null for the OrderItem Edit action post method sub list and this picture shows the inspected form fields. any help? note that I am using JQuery Ajax to send the data using form .serialize() method and this is the data that it sends.

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

Kendo UI Web grid read fails after pagination

I am using Kendo UI web Grid on ASP.NET MVC 4 Application.
I noticed a strange problem in it.
I have a grid with about 72 records, which will show only 20 records per page size.
you can click on pagination to see next 20 records.
after you click on next page 2 you can see next 20 records of 72.
Here I have a jQuery call to refresh grid.
var grid = $("#myGrid").data("kendoGrid");
grid.dataSource.read();
I noticed the problem is, when I use jQuery to read the grid again.
It is not resetting [DataSourceRequest] DataSourceRequest request and that is creating the problem.
How can i fix this.
Solution
following #paris below code resolved the issue.
var grid = $("#myGrid").data("kendoGrid");
grid.dataSource.page(1);
grid.dataSource.read();
Try putting grid.dataSource.page(1); before the read() call if you don't mind refreshing the grid back to page one.

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