This is a migrated thread and some comments may be shown as answers.
Issue with RadGrid ImageButton
5 Answers 198 Views
This is a migrated thread and some comments may be shown as answers.
Wenchao
Top achievements
Rank 1
Wenchao asked on 20 Nov 2008, 07:02 AM
Hi
I am using RadGrid,  and I have a problem with the "Edit,Update,Cancel" 'Delete" columns.
Everything is working fine if the button styles are set to 'LinkButton' or 'Pushbutton'

However as long as I change the button style to "Imagebutton", and clicking "Edit" or "Delete " button the application crashes.
with exception like below:
 
"Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: 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."

And everything stopped in the file "MicrosoftAjax.debug.js" line 4723
......................................
            _this._clearTimer();
            _this._responseAvailable = true;
            try {
                _this._webRequest.completed(Sys.EventArgs.Empty);
            }
            finally {   ------------------------------------------------------------------------------->stops here
                if (_this._xmlHttpRequest != null) {
                    _this._xmlHttpRequest.onreadystatechange = Function.emptyMethod;
                    _this._xmlHttpRequest = null;
                }
            }
        }

Wondering whether some settings need to be done, thanks if anyone can help me.

5 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 20 Nov 2008, 08:44 AM
Hello Wenchao,

I tried to recreate the mentioned behavior to no avail. Please test the attached demo locally and let me know whether the problem persists.

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Wenchao
Top achievements
Rank 1
answered on 20 Nov 2008, 11:27 PM
Hi Daniel,
thanks for the code.
Everything was perfect when using sqldatasource.

But I want to use datatable or dataset as the RadGrid.DataSource.
So what I did was setup the column names, datafield accordingly and also "Edit", "Cancel" buttons.
then assigning datatable to RadGrid.DataSource on Page_Load(), this way is working fine if the "button column" are link button or push button, only crashed when it's set to imagebutton.
0
Daniel
Telerik team
answered on 21 Nov 2008, 08:52 AM
Hello Wenchao,

Please find the modified version of the example attached to this thread. I replaced the SqlDataSource control with DataTable as you depicted.

protected void Page_Load(object sender, EventArgs e) 
    RadGrid1.DataSource = GenerateTable(); 

If you still experience difficulties I recommend you to attach your code to a formal support ticket.

Best regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
José Gustavo Roa de la Fuente
Top achievements
Rank 1
answered on 02 Jul 2009, 09:10 PM
I am using on my project the Telerik.Web.Design.dll version 2009.1.402.35 assembly, but I am having the same problem and the same message. Is it a bug of the RadGrid control?
0
Daniel
Telerik team
answered on 08 Jul 2009, 08:57 AM
Hello José,

May I ask you to provide a sample (runnable) project that demonstrates the issue? This way I will be able to debug it locally and then provide to the point answer/solution for you. Please attach the project via our support ticket system.
Send a support ticket

Regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Wenchao
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Wenchao
Top achievements
Rank 1
José Gustavo Roa de la Fuente
Top achievements
Rank 1
Share this question
or