hi
when in inherit webdorpdown the CreateChildControls() not called, i place a break point in CreateChildControls() method, but break point is not hitting, it will work for asp.net native contorls
pls help me hout
Hi Sai,
Could you show me some of your code to see how you inherited it? I have just checked this and the CreateChildControls is definitely handled in the control, and it calls its base method, therefore at some point WebControl's CreateChildControls will be called.
Thanks,
Angel
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Infragistics.Web.UI.ListControls;
using Infragistics.WebUI.UltraWebGrid;
using System.Data;
namespace ServerControl1
{
[DefaultProperty("Text")]
[ToolboxData("<{0}:CustomWebCombo runat=server></{0}:CustomWebCombo>")]
public class CustomWebCombo : WebDropDown, INamingContainer
RequiredFieldValidator requiredFieldValidator = new RequiredFieldValidator();
public CustomWebCombo()
}
[Bindable(true)]
[Category("Custom-Properties")]
[DefaultValue("")]
[Localizable(true)]
public DataSet GridData
get
if (!DesignMode)
DataSet s = (DataSet)Page.Session["UpdatedGridData" + this.ID];
return ((s == null) ? null : s);
return null;
set
Page.Session["UpdatedGridData" + this.ID] = value ;
[Category(" Custom Properties")]
[DefaultValue(false)]
public bool Mandatory
if (ViewState["Mandatory"] != null)
bool s = (bool)ViewState["Mandatory"];
return s;
else
return false;
ViewState["Mandatory"] = value;
public string MandatoryErrorMessage
{ get
String s = (String)ViewState["MandatoryErrorMessage"];
return ((s == null) ? "Mandatory" : s);
ViewState["MandatoryErrorMessage"] = value;
protected override void Render(HtmlTextWriter output)
base.Render(output);
protected override void CreateChildControls()
requiredFieldValidator = new RequiredFieldValidator();
requiredFieldValidator.ID = "mandatroy" + this.ID;
requiredFieldValidator.ErrorMessage = MandatoryErrorMessage ;
requiredFieldValidator.ControlToValidate = this.ID ;
Controls.Add(requiredFieldValidator );
base.CreateChildControls(); }
The issue that you found has been registered with #26219. Please, use that number to track the progress on this issue.
Dimitar