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 I am just starting to work with Infragistics after several years, for my project I need to subclass WebDropDown and like the previous person it doesn't appear like CreateChildControls ever gets fired.
Is this the case? Is there a work around? Please let me know as my evaluation period is very short.
Thanks.
Hi,
From your code it is not clear to me where exactly the control gets data bound. EnsureChildControls is called only if there is a data source assigned (either DataSourceID or a DataSource object, as it is in your case).
I am sure if you assign the DataSource property , in Page_Load for example, it will work fine.
Thanks,
Angel
Hi Sai,
The issue that you found has been registered with #26219. Please, use that number to track the progress on this issue.
Dimitar
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(); }
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.