This is a migrated thread and some comments may be shown as answers.

How to refresh telerik:RadGrid Batch Editing state with out post back

2 Answers 309 Views
Grid
This is a migrated thread and some comments may be shown as answers.
shamim
Top achievements
Rank 1
shamim asked on 09 Mar 2015, 05:47 PM
Looking for javascript Method which will force client rebind of the telerik:RadGrid Batch Editing and will refresh its state with out post backI used bellow syntax to refresh grid state,it’s not working

function assignDataSourceAndRefresh()
{
var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
masterTable.dataBind();
}

I also used bellow syntax it’s working but it’s make a post back.i need a process which refresh grid state without postback

function testRefresh(sender, args) {
alert("shamim");

var batchManager = $find('<%=RadGrid2.ClientID%>').get_batchEditingManager();
batchManager.cancelChanges($find('<%=RadGrid2.ClientID%>').get_masterTableView());
}

2 Answers, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 12 Mar 2015, 09:42 AM
Hello Shamim,

I am afraid that there isn's a way to refresh the state of the grid without performing a postback. Generally you can call rebind on the grid from the client by using the following approach.
function assignDataSourceAndRefresh()
{
    var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
    masterTable.rebind();
}

Keep in mind that no postback will be performed only if you are binding the grid on the client.

Regards,
Kostadin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Hino
Top achievements
Rank 1
answered on 11 May 2020, 01:45 AM

I used a javascript to perform a click on a asp button so that the page will do postback. The rebind is in the server side.

document.getElementById("Refresh_btn").click();

So far it's working for me.

Tags
Grid
Asked by
shamim
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Hino
Top achievements
Rank 1
Share this question
or