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
ConnectionClass
04.
05.
If
(e.CommandName =
"Update"
)
Then
06.
07.
For
Each
editedItem
As
GridEditableItem
In
RadGrid1.EditItems
08.
Dim
newValues
As
Hashtable =
New
Hashtable
09.
10.
'The GridTableView will fill the values from all editable columns in the hash
11.
e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editedItem)
12.
13.
'perform update
14.
15.
editedItem.Edit =
False
16.
Next
17.
End
If
18.
RadGrid1.Rebind()
19.
End
Sub
Many thanks in advance!