Infragistics Home

Infragistics Forums

Infragistics community online discussions.
Welcome to Infragistics Forums Sign in | FAQ
in Search

Different cell type in the same column

Last post 08-11-2008 17:45 by WombatEd. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 08-08-2008 6:58

    • ashokk
    • Top 200 Contributor
    • Joined on 06-02-2008
    • Points 415

    Different cell type in the same column

    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

     

    • Post Points: 20
  • 08-08-2008 8:21 In reply to

    Re: Different cell type in the same column

     

    Hello,  

    This behavior is not supported out of the box. You can set type only for column.

    Thanks.

     

    Best Regards,
    Ivan Baev
    The Infragistics ASP.NET Team
    • Post Points: 20
  • 08-08-2008 10:21 In reply to

    • ashokk
    • Top 200 Contributor
    • Joined on 06-02-2008
    • Points 415

    Re: Different cell type in the same column

    Hi

    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?

     

    Ashok

    • Post Points: 20
  • 08-08-2008 10:56 In reply to

    Re: Different cell type in the same column

    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"));

    Best Regards,
    Rumen Stankov (MCSD.NET)
    The Infragistics ASP.NET Team
    • Post Points: 20
  • 08-11-2008 17:45 In reply to

    • WombatEd
    • Top 10 Contributor
    • Joined on 10-30-2007
    • Culver City, CA
    • Points 8,073

    Re: Different cell type in the same column

    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.

    Let me know if my post is a "hit" or a "miss" - use the "Answer" button and the star ratings.

    Edward McCarroll
    Applications Developer
    (Available for Hire - Contact Me)

    • Post Points: 5
Page 1 of 1 (5 items)
Powered by Community Server (Commercial Edition), by Telligent Systems