This is a migrated thread and some comments may be shown as answers.

[Solved] ButtonType="ImageButton" error

1 Answer 99 Views
Grid
This is a migrated thread and some comments may be shown as answers.
FreshOne
Top achievements
Rank 1
FreshOne asked on 19 Jan 2010, 04:33 PM
hi all,

when i use ButtonType="ImageButton" in the edit columns i get this error when i click on the button

Sys.WebForms.PageRequestManagerServerErrorException: Invalid postback or callback argument. Event validation is enables using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true"%> in a page. Fpr 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.

wht's causing it? any ideas?

plz find my code below if it help, thnx in advance

    <telerik:RadGrid AllowFilteringByColumn="true" AllowSorting="true" ID="RadGrid1" Skin="Telerik"  GridLines="None" runat="server" AllowAutomaticDeletes="True" 
            AllowAutomaticInserts="True" PageSize="10" AllowAutomaticUpdates="True" AllowPaging="True" AutoGenerateColumns="False">  
            <PagerStyle Mode="NextPrevAndNumeric" /> 
            <MasterTableView Width="100%" CommandItemDisplay="TopAndBottom" DataKeyNames="ID" 
                HorizontalAlign="NotSet" AutoGenerateColumns="False" EditMode="PopUp">  
                <Columns> 
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">  
                        <ItemStyle CssClass="MyImageButton" /> 
                    </telerik:GridEditCommandColumn> 
                    <telerik:GridBoundColumn DataField="title" HeaderText="Title" SortExpression="title" ColumnEditorID="GridTextBoxColumnEditor1" 
                        UniqueName="title">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridTemplateColumn HeaderText="File" SortExpression="file" UniqueName="file">  
                        <ItemTemplate> 
                            <href='/Files/Headers/<%# Eval("file") %>' target="_blank"><%# Eval("file") %></a>  
                        </ItemTemplate> 
                        <EditItemTemplate> 
                                <telerik:RadUpload ID="RadUpload1" runat="server" AllowedFileExtensions=".jpg,.jpeg, .flv, .swf" OverwriteExistingFiles="false" TargetPhysicalFolder="/Files/Headers" ControlObjectsVisibility="None"></telerik:RadUpload> 
                        </EditItemTemplate> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridButtonColumn ConfirmText="Delete this header?" ConfirmDialogType="RadWindow" 
                        ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete" 
                        UniqueName="DeleteColumn">  
                        <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" /> 
                    </telerik:GridButtonColumn> 
                </Columns> 
                <EditFormSettings CaptionDataField="title" CaptionFormatString="Edit header {0}" PopUpSettings-Modal="true">  
                    <PopUpSettings Width="500px"   /> 
                    <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle> 
                    <EditColumn ButtonType="ImageButton" InsertText="Insert header" UpdateText="Update header" CancelText="Cancel edit">  
                    </EditColumn>                      
                </EditFormSettings> 
            </MasterTableView> 
            <ClientSettings> 
                <ClientEvents OnRowDblClick="RowDblClick" /> 
            </ClientSettings> 
        </telerik:RadGrid> 

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 21 Jan 2010, 04:59 PM
Hello,

I suggest you go through the following forum thread, which discusses a similar issue and see if it helps.
error when using ButtonType="ImageButton"

Let me know if you need further assistance.

Regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
FreshOne
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or