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
80
WebDataGrid Styling Issues
posted

I'm running into a couple issues with styling regarding the WebDataGrid. The first being that I'm unable to get my header row text to not wrap. I've put a "white-space: nowrap !important" style on them but for some reason, even though developer tools show that this is the style that should be taking precedence, the text will appear on multiple lines unless the column is wide enough to incorporate the text on one line. I saw a post from about 4 years ago saying that this was an unfortunate bug with these grids in IE7 but this is several iterations of Infragistics later and IE11 so I'm hoping there is some sort of fix.

The other issue is that the header columns are not aligned exactly with the columns beneath them. I've seen people describe similar issues to this but the details never seem to match up with what I'm experiencing. What appears to be happening is that every column header is 2 pixels wider than the rest of the column it's in. The result is that each successive column pushes all columns to the right of it by two pixels until, in some cases, the column header isn't even above the column it should be associated with. For some reason this behavior (usually) corrects itself after I resize a column. (Screenshots below)

Any help on either of these issues would be tremendous. If you need any more details please let me know.

v I made the background color green so the cell borders would be much more visible to illustrate the problem v

  • 1740
    Offline posted

    Hello Philip,

    Thank you for your question.

    For the first issue, you can see the attachment below, it works fine there. The second way is, to set to the current header cell CssClass attribute and you can change the style through css too.

    .WrapTextHeader

    {

      white-space: nowrap;

    }

    After that add property CssClass to Header and set it  to your class:

    <ig:BoundDataField DataFieldName="ProductName" Key="ProductName">

      <Header Text="HeaderTextIsToo Long To Be Displayed"

      CssClass="WrapTextHeader" />

    </ig:BoundDataField>


    I couldn't reproduce the second issue. Could you please send me an isolated working sample to see the problem better.

    I'm looking forward your reply.

    WDG-UnwrapHeaderText.zip