This question is locked. New answers and comments are not allowed.
I have a Telerik grid and i have created a tool bar on top of the grid for performing some actions for either single or multiple records.
The first column I have in the grid is check box template. It lets user select one or more records and then you can select a particular action from the toolbar.
For example, I select a row and try to activate the user. I am able to do this action. After the action is been performed, i refresh the result and hence the telerik grid. Now if i select the same record and select a different action, it does not do anything. It still calls the first action that i performed. If i refresh the whole page or search result and then try to do a different action with the same record then it works.
It let me to believe that the page/grid does not refresh after i perform a action. I have to manually either refresh the search result or load the grid again.
Do you know how to resolve this refresh issue? I am using AJAX Binding and here is the code for refreshing my grid.
PostAction = function (gridId, actionName, postURL, data, callback) {
$.ajax({
type: 'POST',
url: postURL,
data: data,
success: function (result) {
if (result.ok) {
PostRefresh(gridId, result);
if (callback)
callback();
}
}
});
};
PostRefresh = function (gridId, result) {
if (result.refresh || result.ok) {
$('input:checkbox:checked', gridId).attr('checked', false);
updateActionAvailability(gridId);
$(gridId).data('tGrid').ajaxRequest();
}
};
The first column I have in the grid is check box template. It lets user select one or more records and then you can select a particular action from the toolbar.
For example, I select a row and try to activate the user. I am able to do this action. After the action is been performed, i refresh the result and hence the telerik grid. Now if i select the same record and select a different action, it does not do anything. It still calls the first action that i performed. If i refresh the whole page or search result and then try to do a different action with the same record then it works.
It let me to believe that the page/grid does not refresh after i perform a action. I have to manually either refresh the search result or load the grid again.
Do you know how to resolve this refresh issue? I am using AJAX Binding and here is the code for refreshing my grid.
PostAction = function (gridId, actionName, postURL, data, callback) {
$.ajax({
type: 'POST',
url: postURL,
data: data,
success: function (result) {
if (result.ok) {
PostRefresh(gridId, result);
if (callback)
callback();
}
}
});
};
PostRefresh = function (gridId, result) {
if (result.refresh || result.ok) {
$('input:checkbox:checked', gridId).attr('checked', false);
updateActionAvailability(gridId);
$(gridId).data('tGrid').ajaxRequest();
}
};