Hello everybody,
following problem:
I have a RadGrid with a datasource to a custom class. The Grid is in "Batch" edit mode. When I try to save the changes in "itemcommand" event the edititems count are zero. Do u have any ideas?
Many thanks in advance!
following problem:
I have a RadGrid with a datasource to a custom class. The Grid is in "Batch" edit mode. When I try to save the changes in "itemcommand" event the edititems count are zero. Do u have any ideas?
<telerik:RadGrid runat="server" ID="RadGrid1" ShowFooter="True" AllowFilteringByColumn="false" AllowSorting="True" ExportSettings-FileName="Besuchspruefung" OnNeedDataSource="RadGrid1_NeedDataSource" OnBatchEditCommand="RadGrid1_BatchEditCommand" OnItemCommand="RadGrid1_ItemCommand" OnItemDataBound="RadGrid1_ItemDataBound"> <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top" CommandItemSettings-ShowAddNewRecordButton="false" DataKeyNames="besuchID_Ist" EditMode="Batch"> <BatchEditingSettings OpenEditingEvent="Click" EditType="row" SaveAllHierarchyLevels="false" />01.Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs)02. Dim u As tmeotUser = CType(Membership.GetUser(), tmeotUser)03. Dim con As New ConnectionClass04. 05. If (e.CommandName = "Update") Then06. 07. For Each editedItem As GridEditableItem In RadGrid1.EditItems08. Dim newValues As Hashtable = New Hashtable09. 10. 'The GridTableView will fill the values from all editable columns in the hash11. e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editedItem)12. 13. 'perform update14. 15. editedItem.Edit = False16. Next17. End If18. RadGrid1.Rebind()19. End SubMany thanks in advance!
