Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
145
Dynamically created WebDatePicker non-functional
posted

I have an app that allows user to pick reports to run. Each report has its own set of parameters. When that parameter is a DateTime, I'd like to use the WebDatePicker. The controls are created in the code-behind page.

This is working with all the asp.net controls. But when I try to do it with Infragistics WebDatePicker, I get a text-box and button. Clicking the button shows a message in the status bar about "Downloading pictures from http://localhost..gte_SpinButtonbgPressed.gif" hard to see as it goes by so fast.

I have include reference to the Infragistics.Web.UI.EditorControls in the .aspx file and "using Infragistics.Web.UI.EditorControls" in the code-behind.

Here are the lines of C# code I'm using to create the controls:

 ctlParam = new WebDatePicker();

pnlParametersRight.Controls.Add(ctlParam);

 

 

 

 

 

 

 

ctlParam.EnableViewState =

 

false;

ctlParam.Width = 225;

ctlParam.ID = rpi.Name;

ctlParam.Attributes.Add(

 

"StyleSetName", "Default");

ctlParam.Attributes.Add(

 

"ChangeMonthToDateClicked", "true");

ctlParam.Attributes.Add(

 

"EnableMonthDropDown", "true");

ctlParam.Attributes.Add(

 

"EnableYearDropDown", "true");

Is there something I'm missing in this code?

Here's what I'm seeing in the source code for the WebDatePicker control when I run the app:

 

<td style='text-align:right;'>

<span class="ParameterLabel">Start Date</span>

</td>

<td style='text-align:left;'>

<input type="hidden" id="mnuiQuery_tmpl1_StartDate_clientState" name="mnuiQuery_tmpl1_StartDate_clientState" />

<table title="{0}" id="mnuiQuery_tmpl1_StartDate" StyleSetName="Default" ChangeMonthToDateClicked="true" EnableMonthDropDown="true" EnableYearDropDown="true" class="ParameterControl igte_EditWithButtons" cellspacing="0" cellpadding="0" border="0" style="width:225px;">

<tr>
<td class="igte_Inner" valign="top" style="height:100%;">

<input readonly="readonly" id="x:1269809462.0:mkr:3" class="ParameterControl igte_EditInContainer" type="text" style="ime-mode:disabled;float:left;height:100%;width:99.3%;text-align:NotSet;" />

</td>

<td id="x:1269809462.1:mkr:2" align="center" valign="middle" class="igte_Button igte_ButtonSize" style="height:auto;line-height:1px;font-size:1px;">

<img class="igte_ButtonImg" src="ig_res/Default/images/igte_custom.gif" alt="Custom Action" align="middle" border="0" />

</td>
</tr>
</table>

</td>

Thanks in advance,

Michell