I am trying to close the edit form of this RadGrid:
However, I am getting an exception. When I remove "IsItemInserted = False" assignment, the exception goes away. I also want to mention that I am opening the page in certain scenarios with "IsItemInserted = True" with no problem. The grid opens fine and displays the edit form. Any ideas?
Thanks in advance!!
<
telerik:RadGrid
ID
=
"rgAccountRangeSet"
runat
=
"server"
AutoGenerateColumns
=
"False"
GridLines
=
"None"
AllowAutomaticDeletes
=
"True"
AllowAutomaticInserts
=
"True"
AllowAutomaticUpdates
=
"True"
PageSize
=
"25"
AllowPaging
=
"True"
AllowSorting
=
"True"
>
<
PagerStyle
Mode
=
"NumericPages"
/>
<
MasterTableView
AutoGenerateColumns
=
"False"
CommandItemDisplay
=
"Top"
CommandItemSettings-ShowRefreshButton
=
"False"
HorizontalAlign
=
"NotSet"
DataKeyNames
=
"Id"
>
<
CommandItemSettings
AddNewRecordText
=
"Add New Account Range"
AddNewRecordImageUrl
=
"~/images/Keymaster/add.gif"
/>
<
NoRecordsTemplate
>
<
center
><
b
>No records available</
b
></
center
>
</
NoRecordsTemplate
>
<
Columns>
</
Columns
>
<
EditFormSettings
>
<
EditColumn
ButtonType
=
"PushButton"
/>
</
EditFormSettings
>
</
MasterTableView
>
</
telerik:RadGrid
>
With the following code:
Private
Sub
rgAccountRangeSet_InsertCommand(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.Web.UI.GridCommandEventArgs)
Handles
rgAccountRangeSet.InsertCommand
'code to handle insert items has been removed
rgAccountRangeSet.Rebind()
rgAccountRangeSet.MasterTableView.IsItemInserted =
False
End
Sub
However, I am getting an exception. When I remove "IsItemInserted = False" assignment, the exception goes away. I also want to mention that I am opening the page in certain scenarios with "IsItemInserted = True" with no problem. The grid opens fine and displays the edit form. Any ideas?
Thanks in advance!!