Howto: change font size of a particular column ?

3 posts, 0 answers
  1. JD.
    JD. avatar
    37 posts
    Member since:
    Aug 2012

    Posted 24 Sep 2011 Link to this post


    I have skin applied to grid.   The value of one column wraps to next line and so
    I wanted to change its fontsize to smaller so that it adjusts itself without wraping.

    I tried applying CSS for that column, but no effect.

    So how can i change fontname and  fontsize of a particular column , both at design and runtime, irrespective of skin applied.

  2. Jayesh Goyani
    Jayesh Goyani avatar
    2733 posts
    Member since:
    May 2010

    Posted 25 Sep 2011 Link to this post


    please check below code snippet.

    <style type="text/css">
                font-size : 20px !important;
    <telerik:GridBoundColumn >
                        <HeaderStyle CssClass="customClass" />
                        <ItemStyle CssClass="customClass" />

    Let me know if any concern.

    Jayesh Goyani
  3. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 26 Sep 2011 Link to this post

    Hello J,

    You can try the same approach in the ColumnCreated event as well.
    protected void RadGrid1_ColumnCreated(object sender, GridColumnCreatedEventArgs e)
      if (e.Column.UniqueName == "ColUniqueName")
        GridBoundColumn boundColumn = e.Column as GridBoundColumn;
        boundColumn.HeaderStyle.CssClass = custom;
    <style type="text/css">
          font-size  :20px !important;

Back to Top