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
1730
adjusting column width
posted

Hi,

I am using igGrid MVC Helper and specifying columns explicitly.

Is there any way to adjust column width ??

At the moment its taking equal size for all columns and that is causing some column text to wrap. How can i control text wrap ??

Parents
  • 23953
    Suggested Answer
    Offline posted

    Hi,

    You can set column width by using the width option in JavaScript or Width() method in MVC.

    Width can be set either in pixels or in percents as described in igGrid Columns and Layout topic.

    In order to control cell text wrap you should use CSS rules.

    For example if you want one line cells then you should use white-space: nowrap;

    .ui-iggrid tbody td {

    white-space: nowrap;

    }

    If you want fixed row height then you should use the following CSS:

    .ui-iggrid tbody td {

                display: block;

                height: 40px; // set your desired row height

    }

    For the fixed row height you can use igGridTooltips feature.

     

    Hope this helps,

    Martin Pavlov

    Infragistics, Inc.

Reply Children