C1GridView column header HorizontalAlign problem?

Posted by: dtrgs-net on 10 September 2017, 11:36 am EST

  • Posted 10 September 2017, 11:36 am EST

    When I set the horizontal align for a column header at design time, I can see that it is aligned to what I set.  But when I save the layout and load it at runtime, the alignment for all the headers are left aligned no matter what I've set them to.  Other column header attributes work (like setting the font style to bold for example). 

    The alignment for 'normal' rows seem to work fine also.

    Am I missing something?



  • Replied 10 September 2017, 11:36 am EST

    I have had this issue too.  

    When looking closer at the HTML that the control creates, it seems that there is a table being created in each heading cell.  There are 2 TD elements.  Your Heading text is in the first TD element, and the second TD element has a blank DIV.  This think it the 2nd TD element that is causing the Left align.

    One thing that worked to center the Headings in Firefox was to wrap your Heading text in tr elements (HeaderText="<tr>QUANTITY IN STOCK</tr>".  This of course didn't work in IE.  Also, any headers that wrap will center themselves... which looks bad next to left aligned shorter headers.

    Sorry I can't provide any solution, just more insight.  

  • Replied 10 September 2017, 11:36 am EST

    Looks like IE8 issue. Try the following workaround:

       <style type="text/css">

           .C1Heading th table





Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels