Sanja Melnichuk
Sanja Melnichuk

Reputation: 3505

Telerik grid rebind return additional parameter from controler

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               
            });
}

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

Upvotes: 0

Views: 787

Answers (1)

Brian Mains
Brian Mains

Reputation: 50728

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.

Upvotes: 1

Related Questions