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
65
Mergnig column header for two columns
posted

I want to one header for two columns.

I have done in following way

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<

 

 

igtbl:UltraGridColumn BaseColumnName="Remove" Key="Remove" Width

="80px">

 

 

 

<CellStyle

>

 

 

 

</CellStyle

>

 

 

 

<HeaderStyle HorizontalAlign

="Right">

 

 

 

<BorderDetails ColorRight="245, 241, 239"

/>

 

 

 

</HeaderStyle

>

 

 

 

<header caption

="Actions">

 

 

 

<rowlayoutcolumninfo originx="4"

/>

 

 

 

</header

>

 

 

 

<footer

>

 

 

 

<rowlayoutcolumninfo originx="4"

/>

 

 

 

</footer

>

 

 

 

<CellStyle CssClass

="UIGridRowContent"/>

 

 

 

</igtbl:UltraGridColumn

>

 

 

 

<igtbl:UltraGridColumn Key="Edit" BaseColumnName="Edit" Width

="45px">

 

 

 

<HeaderStyle

>

 

 

 

<BorderDetails ColorLeft="245, 241, 239"

/>

 

 

 

</HeaderStyle

>

 

 

 

<Header

>

 

 

 

<RowLayoutColumnInfo OriginX="5"

/>

 

 

 

</Header

>

 

 

 

<Footer

>

 

 

 

<RowLayoutColumnInfo OriginX="5"

/>

 

 

 

</Footer

>

 

 

 

<CellStyle CssClass

="UIGridRowContent"/>

 

 

 

</igtbl:UltraGridColumn

>

But on postback, the column header shifts to left and it shows seperator for two columns.

I tried to set properties in code behind after grid binding and OnPreRender method, but it didn't worked

 

foreach (Infragistics.WebUI.UltraWebGrid.UltraGridColumn col in

uwgUserMaintainence.Columns)

{

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

if (col.BaseColumnName.Equals("Remove"))

 

 

{

col.Header.Style.CssClass = "UIGridRowContent"

;

col.Header.Style.HorizontalAlign =

HorizontalAlign.Right;

col.Header.Style.BorderDetails.ColorRight = System.Drawing.

Color.FromArgb(245, 241, 239);

}

 

if (col.BaseColumnName.Equals("Edit"))

{

 

 

 

col.Header.Style.BorderDetails.ColorLeft = System.Drawing.

Color.FromArgb(245, 241, 239);

 

 

 

 ]

 

Can any body tell reason why it is not setting?

Sandip

Parents
No Data
Reply
  • 49378
    posted

    Hi sandiptikole,

    It has been a while since your post but in case you still need help I would be glad to assist you.

    In order to have a header displayed over multiple columns, you need to set the OriginX and SpanX properties of the RowLayoutColumnInfo (which each header has).

    For instance If you want the header to "start" at the second column of the grid, and span over three columns, you would need to use the following markup:

                                <Header Caption="This is an example multiple-column header">
                                    <RowLayoutColumnInfo OriginX="2" OriginY="0" SpanX="3" />
                                </Header>

    More information on how ultraWebGrid headers can be customized can be found in the following discussion:

    http://blogs.infragistics.com/forums/p/9348/206950.aspx

    Please contact me if you have any questions.

    Best Regards,

    Petar Ivanov
    Developer Support Engineer
    Infragistics, Inc.
    http://ko.infragistics.com/support

Children
No Data