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
228
Add control to multicolumn header
posted

Using the Multicolumn Header example at:  http://samples.infragistics.com/2008.2/webfeaturebrowser/default.htm, I've add additional columns to my application's webgrid.

 

 What I would really like to do is add a control, similar to the way you would add a control to a UltraWebGrid.TemplatedColumn, to the ColumnTemplate object I'm adding to the grid using:

 

(after pushing the grid's bound header down one ".OriginY=1")

            int ptsSpan = e.Layout.Bands[0].Columns.Count - 1;// Zero Offset
            ColumnHeader HeadingText = new ColumnHeader();
            HeadingText.Caption = GridHeader;
            HeadingText.RowLayoutColumnInfo.OriginY = 0;
            HeadingText.RowLayoutColumnInfo.OriginX = 0;
            HeadingText.RowLayoutColumnInfo.SpanX = ptsSpan;
            e.Layout.Bands[0].HeaderLayout.Add(HeadingText);

during the grid's InitializeLayout event.

 

Anyone know of a way to insert a control in a ColumnHeader object?

 

Thanks.

 

Parents
No Data
Reply
  • 28464
    Verified Answer
    posted

     Hello,

    I just went through the source for ColumnHeader, but unfortunately also could not find any way to template it via templates or adding controls directly to the Controls collection - neither of these is supported. Maybe you can try adding HTML tags directly in the Caption and see how it goes? e.g. HeaderText.Caption = '<span class='someclass'>Some Caption</span>" to format the appearance?

Children