Hi
I am working on Ultraweb grid.
Is it possible to have different cell type on the same column?
For example, First row of a column is DropDown, and second row of the same column is date type and third row of the column is integer type.
Ashok
Can you give an example of how to do this (hide a control in teh InitializeRow event)?I have the following code in my aspx page:<ig:TemplateDataField Key="Nbr_of_Claims_Sent" Width="11%"> <ItemTemplate> <asp:HyperLink ID="linkNbr_of_Claims_Sent" runat="server" NavigateUrl="abc.aspx" Text='<%# Eval("Nbr_of_Claims_Sent")%>' ForeColor="Blue"></asp:HyperLink> <asp:Label ID="lblNbr_of_Claims_Sent" runat="server" Text='<%# Eval("Nbr_of_Claims_Sent")%>'></asp:Label> </ItemTemplate> <Header Text="Nbr of Claims Sent" /></ig:TemplateDataField>In the InitializeRow event, I want to display the link if the value of the column X = "Y" and I want to display the label of the value of the column X = "N".
Or if you want to do as much as possible in the designer, you can put all needed controls in the template and hide all but one in the InitializeRow handler.
Hello,
I believe you can achieve that using templated columns. In a templated column you can have any content - for example you can start with just a placeholder and then add controls there programmatically in the InitializeRow event. For example:
<igtbl:TemplatedColumn> <CellTemplate> <asp:placeholder runat="server" ID="Placeholder1'> </CellTemplate></igtbl:TemplatedColumn>
and then in InitializeRow, you can do something similar to this (pseudo code, just for reference)
TemplatedColumn col = (TemplatedColumn)e.Row.Cells.FromKey("SomeKey").Column;CellItem ci = (CellItem)col.CellItems[e.Row.Index];Placeholder placeholder = (Placeholder) ci.FindControl("placeHolder1"); if (e.Row.Index == 1) placeholder.Controls.Add(new Label("Some Text 1"));else placeholder.Controls.Add(new TextBox("Some Text 2"));
Thanks for your reply.... I want to have a combobox in the first row of a column and all other values in that column will be text.
Is there any other work around to achive this?
Can i set the style propery of a particular cell to dropdown cell type?
This behavior is not supported out of the box. You can set type only for column.
Thanks.