This question is locked. New answers and comments are not allowed.
Hello,
I'm trying to add a custom refresh button on the tool. I have the custom command calling a controller, but its causing an error. I just want to be able to refresh the grid. I want to do the same thing that the refresh button thats located in the lower left hand corner does on the grid. So I can I call that javascript from the custom command, or is there a better way to do this? I would love to just duplicate the refresh button on the top of the grid as well. Thanks!
My toolbar:
my javascript:
function refreshTelerikGrid( gridName ){
$("#" + gridName).data("tGrid").rebind();
$("#" + gridName).data("tGrid").ajaxRequest();
}
I'm trying to add a custom refresh button on the tool. I have the custom command calling a controller, but its causing an error. I just want to be able to refresh the grid. I want to do the same thing that the refresh button thats located in the lower left hand corner does on the grid. So I can I call that javascript from the custom command, or is there a better way to do this? I would love to just duplicate the refresh button on the top of the grid as well. Thanks!
My toolbar:
.ToolBar(commands =>
{
commands.Insert();
commands.Custom() <-- need to call the javascript below and pass the grid name
})
my javascript:
function refreshTelerikGrid( gridName ){
$("#" + gridName).data("tGrid").rebind();
$("#" + gridName).data("tGrid").ajaxRequest();
}