4 Answers, 1 is accepted
0
Hello Daniel,
Note that when using Batch editing all changes are stored on the client. In case you rebind the grid all changes will be lost. For this purpose the Cancel button simply fire the Redind method and for this purpose the CommandName is RebindGrid.
Could you please elaborate a little bit more on your scenario in order to try provide an alternative approach?
Regards,
Kostadin
Telerik by Progress
Note that when using Batch editing all changes are stored on the client. In case you rebind the grid all changes will be lost. For this purpose the Cancel button simply fire the Redind method and for this purpose the CommandName is RebindGrid.
Could you please elaborate a little bit more on your scenario in order to try provide an alternative approach?
Regards,
Kostadin
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
Daniel
Top achievements
Rank 1
answered on 30 Sep 2016, 11:47 AM
The grid is in a popup so when clicking on Cancel, I would like to Cancel and close the page. If Cancel does not work this way, how can I cancel and close?
0
Hello Daniel,
A possible solution is to override the click event of the Cancel Changes button and close the window manually. Please check out the following code snippet which demonstrates how to hook OnClientClick event of the button.
Regards,
Kostadin
Telerik by Progress
A possible solution is to override the click event of the Cancel Changes button and close the window manually. Please check out the following code snippet which demonstrates how to hook OnClientClick event of the button.
protected
void
RadGrid1_ItemCreated(
object
sender, Telerik.Web.UI.GridItemEventArgs e)
{
if
(e.Item
is
GridCommandItem)
{
GridCommandItem commandItem = e.Item
as
GridCommandItem;
(commandItem.FindControl(
"CancelChangesButton"
)
as
LinkButton).OnClientClick =
"closeAndRebind()"
;
}
}
function
closeAndRebind()
{
// your loging to close the window.
}
Regards,
Kostadin
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
Daniel
Top achievements
Rank 1
answered on 05 Oct 2016, 04:53 PM
Thank you, that works