C1GridView - set column width to match data

Posted by: jwmagno on 10 September 2017, 11:34 am EST

  • Posted 10 September 2017, 11:34 am EST

    I'm an old flexgrid user and I always use the fg.AutoSize to set my column widths.


    How do I set my column widths to match the data in them? I tried setting the nowrap = True but didn't work for the cell data.

  • Replied 10 September 2017, 11:34 am EST

    Hi,


    Suppose your grid has scrolling enabled, in this mode all the columns have pre-defined widths (120px by default). But starting from version x.x.20102.191 there is CellAutosizingMode property which can help to solve the issue.


    Regards,


    Sergey.

  • Replied 10 September 2017, 11:34 am EST

    I'm using the Ajax.net controls for C1 ASP.net 3.0 and I don't see this property.

  • Replied 10 September 2017, 11:34 am EST

    Check the last number in the version of C1.Web.UI.Controls.x.dll. If it is less than 191 then you need to upgrage to a newer version, the CellAutosizingMode property was implemented in build 191.

Need extra support?

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

Learn More

Forum Channels