Width/Length of Data Column

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • schaapiee

    Width/Length of Data Column

    Is there a way to define how long the data columns are, display wise
    on the Form?

    Whether I am using a boolean field (checkbox) or a string field (text
    url) each displays with the same size.
    I know you can select all the columns and resize them after the fact,
    but is there a way to set each columns size default so when it
    displays it is not huge like for the boolean or cut off like for the
    string field..
    Let me know if you need more information.

    Thanks!!

  • Branco Medeiros

    #2
    Re: Width/Length of Data Column

    schaapiee wrote:
    Is there a way to define how long the data columns are, display wise
    on the Form?
    >
    Whether I am using a boolean field (checkbox) or a string field (text
    url) each displays with the same size.
    <snip>

    I'm not sure if I get you. In desing mode you can edit each of the
    columns widht by right clicking in the table, selectig edit Columns
    and, for each column, set its specific width (which, can also be done
    at run time, btw, accessing the grid's Columns property)

    If your table doesn't have too many columns you may prefer to activate
    the grid's automatic fill mode: set the grid's AutoSizeColumns Mode to
    Fill and set each Column's FillWeight property to a value relative to
    its proportion in the grid (bigger values, more space).

    HTH.

    Regards,

    Branco.

    Comment

    • schaapiee

      #3
      Re: Width/Length of Data Column

      On Mar 23, 12:14 pm, "Branco Medeiros" <branco.medei.. .@gmail.com>
      wrote:
      schaapiee wrote:
      Is there a way to define how long the data columns are, display wise
      on the Form?
      >
      Whether I am using a boolean field (checkbox) or a string field (text
      url) each displays with the same size.
      >
      <snip>
      >
      I'm not sure if I get you. In desing mode you can edit each of the
      columns widht by right clicking in the table, selectig edit Columns
      and, for each column, set its specific width (which, can also be done
      at run time, btw, accessing the grid's Columns property)
      >
      If your table doesn't have too many columns you may prefer to activate
      the grid's automatic fill mode: set the grid's AutoSizeColumns Mode to
      Fill and set each Column's FillWeight property to a value relative to
      its proportion in the grid (bigger values, more space).
      >
      HTH.
      >
      Regards,
      >
      Branco.
      Ok here is what I am talking about..

      System.Windows. Forms.Data Grid
      Properties: Layout-Preferred Column Width = 75

      This sets a default for all columns, but how can I set this for each
      column individually so each column better fits with the width of the
      longest item in each column? My actual columns do not show until
      runtime; in design mode only the datagrid shows.
      Hope this helps..thanks for the help!

      Comment

      Working...