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
435
Text align in column
posted

I'm trying to align right the text of the numeric columns in a WebHierarchicalDataGrid.

I tried to use the cssClass property of the BoundDataField but it made nothing and i saw another post where somebody suggested the use of an ItemTemplate but the problem is than by doing this i can't use filters.

Is there any other way to achieve this?

Parents
  • 33839
    Verified Answer
    posted

    Hi fjVazquez,

    The correct way to do it is with css classes.  However, you need to be sure to have the appropriate selectors.  And since you're doing it  in the WHDG, you need to apply it to the WHDG column BEFORE the grid view is created.  And likewise to a band before a row island is made from that band.  Or just do it on the aspx.

    this.WHDG1.Columns[0].CssClass = "right";

    tbody>tr>td.right

    {

    text-align : right;

    }

    regards,
    David Young 

Reply Children
No Data