Hii,
I am creating grid view in application using dev express. I have created partial view for grid according to demo application of dev express. I have binded grid successfully but I stucked in problem. How can I pass parameter in java script function from grid view (partial view). my code is like that:
settings.HtmlRowPrepared = (s, e) =>
{
MVCxGridView g = s as MVCxGridView;
index = g.PageIndex;
pageCount = g.SettingsPager.PageSize;
};
and
I am calling function :
[C#]
settings.ClientSideEvents.EndCallback = "Micrograph";
This function I have declared on main view.
But I am unable to access parameter "index" and "pageCount" in method of micrograph.
function Micrograph() {
var currentIndex= index;
var totalRow= pageCount;
}
Please help me I couldn't get value of index and pageCount.
Thanks in advance.
What I have tried:
settings.HtmlRowPrepared = (s, e) =>
{
MVCxGridView g = s as MVCxGridView;
index = g.PageIndex;
//settings.ClientSideEvents
pageCount = g.SettingsPager.PageSize;
//pageCount = g.PageCount;
}; for this I have tried custom js properties of dev express:
settings.CustomJSProperties = (sender, e) =>
{
var gridview = sender as MVCxGridView;
gridview.JSProperties["cpCurrentVal"] = index;
gridview.JSProperties["cpPageSize"] = pageCount;
};
but I didn't get value in javascript function on main view.