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

Both ItemCommand and InsertCommand called on PerformInsert?

1 Answer 61 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jay
Top achievements
Rank 2
Iron
Iron
Veteran
Jay asked on 04 Nov 2014, 07:58 PM
I have both of these set on my grid, e.g.

OnItemCommand="RadGrid_Application_ItemCommand" OnInsertCommand="RadGrid_Application_InsertCommand"

and on an insert, it seems both of these are being invoked, both having CommandName == RadGrid.PerformInsertCommandName (the ItemCommand is also invoked with CommandName == RadGrid.InitInsertCommandName).

For whatever reason, I was thinking that only the OnInsertCommand would be invoked for the PerformInsert. Is having both of these be invoked the expected behavior?

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 07 Nov 2014, 12:35 PM
Hi Jay,

Yes, this behavior is designed by default. For convenience, RadGrid provides individual event handlers like  OnSortCommand, OnPageSizeChanged, OnUpdateCommand, etc. Along with that, every grid action/command also raises the OnItemCommand event which can be used for generic or custom implementations.

Hope this helps.

Regards,
Eyup
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.

 
Tags
Grid
Asked by
Jay
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
Eyup
Telerik team
Share this question
or