Kendo Grid with url takes to another kendo grid
I'm stuck with reading the querystring value from grid1 url to grid2 controller.. Any help appreciated..
Grid1
Index.cshtml
columns.Bound(e => e.TCBSTAGE).Width(100).ClientTemplate("<a href='/" + "ControllerName" + "/Index?Batchno=#=BatchNo#'>#=TCBSTAGE#</a>");
Grid2Index.Cshtml
<script>$(function(){
$("#grid").kendoGrid({
dataSource: {
transport: {
read: {
url: "ControllerName2/GetRecords",
contentType: "application/json",
type: "POST"
},
parameterMap: function (options) {
return kendo.stringify(options);
}
},
schema: {
data: "Data",
total: "Total"
},
pageSize: 10,
serverPaging: true,
serverFiltering: true,
serverSorting: true
},
groupable: true,
filterable: true,
sortable: true,
pageable: true,
columns: [
{ field: "BatchNo", title: "BatchNo" },
{ field: "Fiscal_Year ", title: "Fiscal_Year" },
{ field: "Department", title: "Department" }
]
});
});</script>
Grid 2 controller.. I need to get the Batchno value here
ControllerName2.cs
[HttpPost]
public ActionResult GetRecords(int take, int skip, IEnumerable<Kendo.DynamicLinq.Sort> sort, Kendo.DynamicLinq.Filter filter)
{
//Batchno from grid1 url
I need the querystring id from grid1 here.... }
Any Help appreiciated. Thank you
I'm stuck with reading the querystring value from grid1 url to grid2 controller.. Any help appreciated..
Grid1
Index.cshtml
columns.Bound(e => e.TCBSTAGE).Width(100).ClientTemplate("<a href='/" + "ControllerName" + "/Index?Batchno=#=BatchNo#'>#=TCBSTAGE#</a>");
Grid2Index.Cshtml
<script>$(function(){
$("#grid").kendoGrid({
dataSource: {
transport: {
read: {
url: "ControllerName2/GetRecords",
contentType: "application/json",
type: "POST"
},
parameterMap: function (options) {
return kendo.stringify(options);
}
},
schema: {
data: "Data",
total: "Total"
},
pageSize: 10,
serverPaging: true,
serverFiltering: true,
serverSorting: true
},
groupable: true,
filterable: true,
sortable: true,
pageable: true,
columns: [
{ field: "BatchNo", title: "BatchNo" },
{ field: "Fiscal_Year ", title: "Fiscal_Year" },
{ field: "Department", title: "Department" }
]
});
});</script>
Grid 2 controller.. I need to get the Batchno value here
ControllerName2.cs
[HttpPost]
public ActionResult GetRecords(int take, int skip, IEnumerable<Kendo.DynamicLinq.Sort> sort, Kendo.DynamicLinq.Filter filter)
{
//Batchno from grid1 url
I need the querystring id from grid1 here.... }
Any Help appreiciated. Thank you