I know how to set the Editor Control ID in an UltraWebGrid, but I'm running into a problem when trying to set the Editor Control ID when using user controls. The scenario is that I have a WebDateChooser object in a user control. I have that user control in another user control, which has an UltraWebGrid.
Here's the markup:
<uc1:ucDateControl ID="ucDateControl1" runat="server" />
<igtbl:UltraWebGrid OnInitializeBand="uwgAssignedUsers_InitializeBand" ID="uwgAssignedUsers" OnInit="uwgAssignedUsers_Init" runat="server" Height="50px" Width="379px"> <Bands> <igtbl:UltraGridBand> <Columns> <igtbl:UltraGridColumn Width="180" Key="AssignedUser" Type="DropDownList" BaseColumnName="FullName"> <Header Caption="" Title=""> </Header> </igtbl:UltraGridColumn> <igtbl:UltraGridColumn DataType="System.DateTime" Key="DateJoined" Type="Custom" BaseColumnName="DateJoined"> <Header Caption="Joined" Title="Joined"> <RowLayoutColumnInfo OriginX="1" /> </Header> <Footer> <RowLayoutColumnInfo OriginX="1" /> </Footer> </igtbl:UltraGridColumn> <igtbl:UltraGridColumn DataType="System.DateTime" Key="DateLeft" Type="Custom" BaseColumnName="DateLeft"> <Header Caption="Left" Title="Left"> <RowLayoutColumnInfo OriginX="2" /> </Header> <Footer> <RowLayoutColumnInfo OriginX="2" /> </Footer> </igtbl:UltraGridColumn> </Columns> <AddNewRow View="NotSet" Visible="no"> </AddNewRow> </igtbl:UltraGridBand> </Bands></igtbl:UltraWebGrid>
Here's the code-behind:
protected void uwgAssignedUsers_InitializeBand(object sender, Infragistics.WebUI.UltraWebGrid.BandEventArgs e) { Infragistics.WebUI.UltraWebGrid.UltraGridColumn uwc = null;
uwc = e.Band.Columns.FromKey("DateJoined");
if (uwc != null) { uwc.EditorControlID = ((Infragistics.WebUI.WebSchedule.WebDateChooser)ucDateControl1.FindControl("wdcDateControl")).UniqueID; } }
Yet, the WebDateChooser never "hooks up" with the grid. In other words, clicking the cell should bring up the date chooser object, but it never does. Is the way I'm doing it correct? Any help appreciated. Thanks.