Hi,
I try to set up a RadGrid with a delete-icon to delete a record. When the delete-button in the GridButtonColumn is from type LinkButton it works fine. But when I change it to an ImageButton to show the delete-icon, I get the following error when deleting a record:
The error appears after the confirmationdialog. I tried the Classic confirmationdialog, but it didn't help.
Any ideas?
I try to set up a RadGrid with a delete-icon to delete a record. When the delete-button in the GridButtonColumn is from type LinkButton it works fine. But when I change it to an ImageButton to show the delete-icon, I get the following error when deleting a record:
Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
The error appears after the confirmationdialog. I tried the Classic confirmationdialog, but it didn't help.
Any ideas?
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
/>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
/>
<
telerik:RadAjaxManagerProxy
ID
=
"RadAjaxManagerProxy1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"grdPlaylistItems"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"grdPlaylistItems"
LoadingPanelID
=
"RadAjaxManagerLoadingPanel1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManagerProxy
>
<
telerik:RadWindowManager
ID
=
"RadWindowManager1"
Skin
=
"Windows7"
runat
=
"server"
>
</
telerik:RadWindowManager
>
<
asp:Label
ID
=
"lblTitlePlaylistItems"
runat
=
"server"
><
strong
>Playlist Items</
strong
></
asp:Label
>
<
telerik:RadGrid
ID
=
"grdPlaylistItems"
runat
=
"server"
>
<
MasterTableView
TableLayout
=
"Fixed"
>
<
Columns
>
<
telerik:GridButtonColumn
CommandName
=
"Delete"
Text
=
"Delete"
UniqueName
=
"DeleteColumn"
ButtonType
=
"ImageButton"
ImageUrl
=
"../images/icons/remove.png"
HeaderStyle-Width
=
"30px"
ConfirmDialogType
=
"RadWindow"
ConfirmDialogHeight
=
"100px"
ConfirmText
=
"Are you sure you want to delete this item?"
ConfirmTitle
=
"Delete playlist item"
>
</
telerik:GridButtonColumn
>
<
telerik:GridTemplateColumn
HeaderStyle-Width
=
"70px"
HeaderText
=
"Thumbnail"
>
<
ItemTemplate
>
<
asp:Image
ID
=
"imgThumbnail"
runat
=
"server"
/>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridBoundColumn
DataField
=
"ItemName"
HeaderText
=
"Name"
HeaderStyle-Width
=
"200px"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"PlaylistItemType"
HeaderText
=
"Type"
HeaderStyle-Width
=
"70px"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"ItemDuration"
HeaderText
=
"Duration"
HeaderStyle-Width
=
"120px"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"SortOrder"
HeaderText
=
"SortOrder"
UniqueName
=
"SortOrder"
HeaderStyle-Width
=
"45px"
Visible
=
"true"
>
</
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
</
form
>
</
body
>