This question is locked. New answers and comments are not allowed.
Hi,
I am facing this problem for many days. I tried to search for some solution for it but couldn't find any.
My requirement is to fill the grid on the change of dropdown. I have implemented the same successfully but after rebind of grid I want to send the dropdown selected value to the Controller [Grid Action]. So that paging can working as desired.
Below is my View code:
@(Html.Telerik().Grid(dt)
.Name("QuestionList")
.Columns(columns =>
{
columns.AutoGenerate(column =>
{
});
})
.DataBinding(db => db.Ajax().Select("_QuestionList", "Page", new { PID = "<#= ProjectID #>" }).Enabled(true))
.Pageable(p => p.Enabled(true).PageSize(20))
.Filterable(f => f.Enabled(true)).Groupable(g => g.Enabled(true)).Footer(true))
And my Controller
[GridAction]
public ActionResult _QuestionList(string PID)
{
DataSet ds = new DataSet();
ds = ICT.Grid(PID);
DataTable dt = new DataTable();
dt = ds.Tables[0];
var d = dt;
ViewBag.d = d;
return View(new GridModel(dt));
}
I am not able to get <# ProjectID #> value.
Can you please suggest me the best way to handle this issue?
Thanks !!
Neha J.
I am facing this problem for many days. I tried to search for some solution for it but couldn't find any.
My requirement is to fill the grid on the change of dropdown. I have implemented the same successfully but after rebind of grid I want to send the dropdown selected value to the Controller [Grid Action]. So that paging can working as desired.
Below is my View code:
@(Html.Telerik().Grid(dt)
.Name("QuestionList")
.Columns(columns =>
{
columns.AutoGenerate(column =>
{
});
})
.DataBinding(db => db.Ajax().Select("_QuestionList", "Page", new { PID = "<#= ProjectID #>" }).Enabled(true))
.Pageable(p => p.Enabled(true).PageSize(20))
.Filterable(f => f.Enabled(true)).Groupable(g => g.Enabled(true)).Footer(true))
And my Controller
[GridAction]
public ActionResult _QuestionList(string PID)
{
DataSet ds = new DataSet();
ds = ICT.Grid(PID);
DataTable dt = new DataTable();
dt = ds.Tables[0];
var d = dt;
ViewBag.d = d;
return View(new GridModel(dt));
}
I am not able to get <# ProjectID #> value.
Can you please suggest me the best way to handle this issue?
Thanks !!
Neha J.