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
115
Setting column widths?
posted

I'm creating a report and want to set the column widths on an iGrid to a specific size, but can't find where to do it.   There are only two columns in this particular grid and they just take up 50% of the page width each, but I wand to be able to set the first column to be much narrower.

How do I do it?

Parents
No Data
Reply
  • 37774
    Verified Answer
    posted

    You should just be able to set the Width on the IGridColumn directly:

    IGridColumn col = grid.AddColumn();
    col.Width = new FixedWidth(100f);
    col = grid.AddColumn();
    col.Width = new RelativeWidth(70f);

    I used the two different types of widths to illustrate the options that you have.  RelativeWidth will use a percentage of the remaining width available to the object (i.e. PageWidth - 100).

    -Matt

Children