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

Can I disable EventValidation for a Control in the PopupForm?

1 Answer 139 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Joshua
Top achievements
Rank 1
Joshua asked on 11 Oct 2009, 06:22 AM
I have a PopUp editform within a <FormTemplate />.  The form has a DropDownList that can be manipulated at runtime by Javascript. 
Since its hidden by FormTemplate, is there any way to access it so that I can disable EventValidation?

Here's what I have:

       protected override void Render(System.Web.UI.HtmlTextWriter writer)  
        {  
            Page.ClientScript.RegisterForEventValidation(((DropDownList)((GridDataItem)RadGrid1.EditItems[0]).EditFormItem.FindControl("ddlCategory")).UniqueID);  
            base.Render(writer);  
        } 

1 Answer, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 15 Oct 2009, 11:09 AM
Hello Joshua,

I have attached a sample page which demonstrates a possible way to handle the scenario in question. You should be aware that all the control's expected values should be registered with page validation mechanism in order to bypass the validation error. Also you may consider using a RadComboBox instead of regular DropDownList as it should handle this scenario without the additional code.

Sincerely yours,
Rosen
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
Joshua
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Share this question
or