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

Run Code after last batch update iteration.

4 Answers 113 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dave
Top achievements
Rank 1
Dave asked on 02 Jan 2015, 04:32 PM
Hi..

I'm using batch edit mode on my rad grid.. I need to run some code after last iteration of the UpdateCommand. http://www.telerik.com/help/aspnet-ajax/grid-batch-editing.html...

How can I test for the last iteration of RadGrid.UpdateCommandName when using batch edit.mode?

             protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
                { 
                      if (e.CommandName == RadGrid.UpdateCommandName)
                      {

                       }
                }

4 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 06 Jan 2015, 12:18 PM
Hello Dave,

Within the OnItemCommand event handler you will not be able to catch the last update command, but you can handle the server-side OnBatchEditCommand event, where all the command will be available in the event arguments (e.Commands):
protected void RadGrid1_BatchEditCommand(object sender, GridBatchEditingEventArgs e)
{
    foreach (GridBatchEditingCommand command in e.Commands)
    {
        //handle the command
    }
 
    // your logic
}

Detailed information on Batch Editing could be found in the following help article:
Hope this helps.


Regards,
Konstantin Dikov
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
Dave
Top achievements
Rank 1
answered on 09 Jan 2015, 04:32 PM
thanks.. I'm using that as well but I needed to run some code after last iteration
0
Dave
Top achievements
Rank 1
answered on 20 Jan 2015, 10:46 AM
Thanks I'm already using this but I cannot place my code here.. I need to switch edit modes of the radgrid after the update because of bug it seems with IE 11 and radgrid batch edit which seemingly breaks select elements. Is there a procedure that is called after the itemcommand where I can set a variable..? As I need to set this after last iteration of update..

thanks
0
Dave
Top achievements
Rank 1
answered on 20 Jan 2015, 10:51 AM
just added to the Pre_render event which think solves my problem.. thanks
Tags
Grid
Asked by
Dave
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Dave
Top achievements
Rank 1
Share this question
or