[CLOSED] Grid Column Width

  1. #1

    [CLOSED] Grid Column Width

    Is there a way to set a grid column's width to be a fixed percentage and not just a fixed pixel size or "flex?" I've tried a variety of the "Cls" properties and seem not to be getting the right combination.
    Last edited by Daniil; Jun 13, 2012 at 2:04 PM. Reason: [CLOSED]
  2. #2
    Quote Originally Posted by adelaney View Post
    Is there a way to set a grid column's width to be a fixed percentage and not just a fixed pixel size or "flex?" I've tried a variety of the "Cls" properties and seem not to be getting the right combination.
    A percentage value is not possible. The .Flex property is a proportional value, so it functions the same as a percentage value.
    Geoffrey McGill
    Founder
  3. #3
    I searched on the flex property and understand how it works, but what happens when you mix some columns at a fixed pixel width and have others with a flex setting? How are the column widths calculated?
  4. #4
    Quote Originally Posted by adelaney View Post
    I searched on the flex property and understand how it works, but what happens when you mix some columns at a fixed pixel width and have others with a flex setting? How are the column widths calculated?
    First all Columns with a specific .Width are summed. Those Columns will render to the .Width you set.

    The total of all .Widths (if set, or 100px by default) is removed from the GridPanel width. The remainder is then proportioned up using any other Column(s) with .Flex values set.


    GridPanel .Width = 500
    
        Column1.Width = 50
        Column2.Width = 150
        Column3.Flex = 2
        Column4.Flex = 1
    The spacing will look similar to the following:

    [     |               |                    |          ]
    If you were to measure the Columns after rendering, the actual px widths would be:

    Column1 = 50
    Column2 = 150
    Column3 = 2/3 of remainder = 200 (approx)
    Column4 = 1/3 of remainder = 100 (approx)
    Hope this helps.
    Geoffrey McGill
    Founder
  5. #5
    That was helpful. Thanks.

Similar Threads

  1. [CLOSED] Grid Panel : Column width (Auto width)
    By legaldiscovery in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Sep 24, 2011, 8:31 PM
  2. Replies: 1
    Last Post: Jul 18, 2011, 11:42 AM
  3. Replies: 0
    Last Post: Mar 12, 2010, 9:30 AM
  4. grid column width
    By [WP]joju in forum 1.x Help
    Replies: 1
    Last Post: Nov 11, 2009, 4:22 PM
  5. [CLOSED] Code Behind Grid Column Width
    By GmServizi in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 23, 2009, 7:44 AM

Tags for this Thread

Posting Permissions