5 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 28 Jan 2014, 08:09 AM
Hi Rem,
I guess you want to do operations from code behind for Batch edit. You can use the OnBatchEditCommand event of the Radgrid.
VB:
Thanks,
Princy
I guess you want to do operations from code behind for Batch edit. You can use the OnBatchEditCommand event of the Radgrid.
VB:
Protected
Sub
RadGrid1_BatchEditCommand(sender
As
Object
, e
As
GridBatchEditingEventArgs)
For
Each
command
As
GridBatchEditingCommand
In
e.Commands
If
(command.Type = GridBatchEditingCommandType.Update)
Then
Dim
newValues
As
Hashtable = command.NewValues
Dim
oldValues
As
Hashtable = command.OldValues
Dim
ID
As
String
= newValues(
"ID"
).ToString()
' Code to Update
End
If
Next
End
Sub
Thanks,
Princy
0
Hi Rem,
Batch editing is client-side oriented edit mode and the server-side BatchEditCommand event will fire only if any of the following client-side function are called from the RadGrid batchEditingManager (and there are changes within the grid): saveChanges(tableView), saveAllChanges() or saveTableChanges(tableViews).
Detailed information about Batch editing is available at the following online help article:
Hope that helps.
Regards,
Konstantin Dikov
Telerik
Batch editing is client-side oriented edit mode and the server-side BatchEditCommand event will fire only if any of the following client-side function are called from the RadGrid batchEditingManager (and there are changes within the grid): saveChanges(tableView), saveAllChanges() or saveTableChanges(tableViews).
Detailed information about Batch editing is available at the following online help article:
Hope that helps.
Regards,
Konstantin Dikov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
0
Mitch
Top achievements
Rank 1
answered on 17 Nov 2014, 04:28 PM
is that a no?
0
Hello Mitch,
Yes, you cannot invoke the BatchEditCommand from the code-behind and I must say that there is no reason for doing so, because in order to pass some values from client-side you will have to use one of the approaches that I have mentioned in my previous post. If you have a postback initiated in some other manner, no changes will be passed to server-side.
Additionally, If you need to perform some CRUD operations, separately from the user's input, you do not need the BatchEditCommand to be fired to perform manual updates to your data source.
Regards,
Konstantin Dikov
Telerik
Yes, you cannot invoke the BatchEditCommand from the code-behind and I must say that there is no reason for doing so, because in order to pass some values from client-side you will have to use one of the approaches that I have mentioned in my previous post. If you have a postback initiated in some other manner, no changes will be passed to server-side.
Additionally, If you need to perform some CRUD operations, separately from the user's input, you do not need the BatchEditCommand to be fired to perform manual updates to your data source.
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
Mitch
Top achievements
Rank 1
answered on 17 Nov 2014, 05:23 PM
right. that makes sense. I was more interested in the values than the function, but I guess that's not quite this question