Hi all i need to pass parameter from controller to client and process it controller:
public ActionResult GetTerminalList(string GroupID, string NodeLevel, string ItemsArr)
{
...
// how to pass my parameter AllChecked?
return View(new GridModel
{
Data = items
});
}开发者_JAVA百科
client code:
var arr = new Array();
var nodeLevel = GetCurrentNodeLevel(e.item,arr);
var groupId = GetGroupId();
var grid = $('#TreeTermGrid').data('tGrid');
grid.rebind({ GroupID: groupId, NodeLevel: nodeLevel, ItemsArr: arr});
and here get var AllChecked = grid.GetParam("AllChecked"); // fake
Main problem to pass it parameter in one request or detect that all checkboxes in all pages are checked. Help me please, thanks a lot
You could try create a subclass inheriting from GridModel to include the new property. However, if I remember, this is for AJAX capabilities, so this would work differently as I don't know if you can embed additional parameters into the model this way.
A workaround for this could be to make a separate AJAX request to get this additional information...
HTH.
精彩评论