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
280
Losing style class characteristics when sorting grid
posted

Version 2007.3 

Currently I have an ultrawebgrid inside an asp.net(2.0 framework) updatepanel. When I first fill the grid everything looks fine. The grid has multilple

Headings(see below) with the correcly assigned css classes . When I sort the information , the sort works fine, but the very first main heading("WeekDays") loses its style class and turns

white with black text. Whats weird is that only the "Weekdays" main heading loses its style, the "Months" heading retains all the CSS qualities assigned

to it. After some brief playing around and adding a new main Heading called "Test" over just the "Mon" column and moving the "WeekDays" heading to be

only above Tues-Wed, the style was only lost for the "Test" main heading that is over the very first column when sorting. What would cause this?

Sample:

WeekDays Loses style on this one

(H1)             WeekDays                                    Months

(H2)Mon      Tues       Wed                               Jan           Feb         March

   Data        Data       Data                              Data          Data         Data

 

Sample 2: Only the "Test" heading loses style on sorting for this one

(H1)Test         WeekDays                                    Months

(H2)Mon      Tues       Wed                               Jan           Feb         March

     Data        Data       Data                              Data          Data         Data

  • 280
    Verified Answer
    posted

    Perhaps I can spare someone else several hours of anguish by putting in the fix.

    All I had to do was change the columheader add to an insert

    .Columns.Band.HeaderLayout.Insert(0, WeekdayColumn)

    instead of

    .Columns.Band.HeaderLayout.Add(WeekdayColumn)

     Of course now I have it in an async panel loading styles from an xml file and the RowStyleDefault style is overriding the FixedHeaderRowStyle, 

     If I take it out of an async panel it works fine. The fun just keeps on comin'.