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

Dynamic Radgrid Delete button not fired on RadGrid1_ItemCommand

1 Answer 72 Views
Grid
This is a migrated thread and some comments may be shown as answers.
mohamed
Top achievements
Rank 1
mohamed asked on 13 Jun 2011, 07:33 AM

I dynamically bind radgrid delete ,
Binding like that ,
confirmation message all the things come
GridButtonColumn btncol = new GridButtonColumn();
 this.RadGrid1.MasterTableView.Columns.Add(btncol);
 btncol.ButtonType = GridButtonColumnType.ImageButton;
 btncol.HeaderStyle.Width = 10;
 btncol.CommandName = "Delete";
 btncol.Text = "delete";
 btncol.UniqueName = "DeleteColumn";
 btncol.CommandArgument = "Child";
 btncol.ConfirmDialogType = GridConfirmDialogType.RadWindow;
 btncol.ConfirmText = "Are You Sure Want To Delete This Record?";
 btncol.ConfirmTitle = "Delete Confirm";

Error Come Like when i click ok button confirm Dialog

 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.

Replay soon Very Urgent
Waiting For Ur replay

Thanks,
Mohamed.

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 15 Jun 2011, 12:57 PM
Hello mohamed,

Can you specify where the pasted piece of code is called? And where is the grid defined?
You can try removing the CommandArgument setting and see if it makes any difference.

Kind regards,
Iana
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
mohamed
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or