
Hi all,
Can u please look into this Post. Please do the needful ASAP.
http://www.telerik.com/account/support-tickets/view-ticket.aspx?threadid=219019
Please do the needful ASAP.
Thanks & regards
Kiran Kumar Bodla
| if (e.Item is GridDataItem) |
| { |
| GridDataItem item = (GridDataItem)e.Item; |
| Button btnProcess = (Button)item["btnProcess"].Controls[0]; |
| if (btnProcess != null) |
| btnProcess.Click +=new EventHandler(btnProcess_Click); |
| } |
During our work, we faced some strange problem that occured when having to use a RangeValidator within an Ajaxified Panel.
The scenario is as following
In the next example, All i was trying to do is to modify the MaximumValue property of the RangeValidator based on a values extracted from a TextBox. This means that the MaximumValue is a variant.
The ASPX Code is as following:
| <html xmlns="http://www.w3.org/1999/xhtml" > | |
| <head runat="server"> | |
| <title></title> | |
| </head> | |
| <body> | |
| <form id="form1" runat="server"> | |
| <div> | |
| <rad:RadScriptManager ID = "scr" runat = "server" /> | |
| <asp:Panel ID = "pnl" runat = "server" > | |
| <asp:TextBox ID = "txt1" runat = "server" AutoPostBack = "true" OnTextChanged = "txt1_TextChanged"/> | |
| <asp:TextBox ID = "txt2" runat = "server" /> | |
| <asp:RequiredFieldValidator ID = "rf" runat = "server" ControlToValidate = "txt2" ValidationGroup = "a" /> | |
| <asp:RangeValidator ID = "rv" runat = "server" Text = "*" ErrorMessage = "Abbas" ForeColor = "Red" ControlToValidate = "txt2" ValidationGroup = "a" Type= "Integer" MinimumValue = "0" MaximumValue = "10" /> | |
| <br /> | |
| <asp:Button ID = "btn" runat = "server" ValidationGroup = "a" OnClick = "btn_Click" Text= "Press Me" CausesValidation = "true"/> | |
| <asp:ValidationSummary ID = "sum" runat = "server" ValidationGroup = "a" ShowSummary = "true" DisplayMode = "BulletList" ShowMessageBox = "true" /> | |
| </asp:Panel> | |
| <rad:RadAjaxManager ID = "rad" runat = "server" > | |
| <AjaxSettings> | |
| <rad:AjaxSetting AjaxControlID = "pnl"> | |
| <UpdatedControls> | |
| <rad:AjaxUpdatedControl ControlID = "pnl" /> | |
| </UpdatedControls> | |
| </rad:AjaxSetting> | |
| </AjaxSettings> | |
| </rad:RadAjaxManager> | |
| </div> | |
| </form> | |
| </body> | |
| </html> | |
The Code Behind is as Following
| using System; | |
| using System.Collections.Generic; | |
| using System.Web; | |
| using System.Web.UI; | |
| using System.Web.UI.WebControls; | |
| namespace WebApplication1 | |
| { | |
| public partial class _Default : System.Web.UI.Page | |
| { | |
| protected void Page_Load(object sender, EventArgs e) | |
| { | |
| } | |
| protected void txt1_TextChanged(object sender, EventArgs e) | |
| { | |
| int x = 0; | |
| int.TryParse(txt1.Text, out x); | |
| rv.MaximumValue = x.ToString (); | |
| rad.Alert ("Maximum Value Set"); | |
| } | |
| protected void btn_Click(object sender, EventArgs e) | |
| { | |
| rad.Alert ("Button Post Back"); | |
| } | |
| } | |
| } | |
Now after some investigation, there is some problem with this validator, At first i thought it was a problem with all the Expando Attributues in the Valiadators, But it turned out to be this RangeValidator that has this specific problem.
Kindly inform us what should we do ?