Results 1 to 5 of 5

Thread: [RESOLVED] Single Row DataGridView

  1. #1

    Thread Starter
    Frenzied Member toecutter's Avatar
    Join Date
    Apr 2006
    Location
    Brisbane, Australia
    Posts
    1,160

    Resolved [RESOLVED] Single Row DataGridView

    is it possible to force a DataGridView to be single row only?

    I cannot set the AllowUserToAddRows to false as i need one row.

    I cannot re size the grid to display a single row as i need the horizontal scollbar.


  2. #2
    PowerPoster cicatrix's Avatar
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,654

    Re: Single Row DataGridView

    If you need one row only then why use datagridview at all? Use several text/combo boxes on a form.
    You can place them in any order and make any layout.

  3. #3

    Thread Starter
    Frenzied Member toecutter's Avatar
    Join Date
    Apr 2006
    Location
    Brisbane, Australia
    Posts
    1,160

    Re: Single Row DataGridView

    the reason being that the amount of textbox's needed could be greater than the forms width.

    So that why i am trying to do it this way, using a grid will give me a horizontal scollbar

    thx

  4. #4
    PowerPoster cicatrix's Avatar
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,654

    Re: Single Row DataGridView

    You can use either a FlowLayout control or simply place some textboxes one under the other.
    Is it absolutely critical to have all the data displayed in one row?

    Horizontal scrollbars are awful and if you can - it's always to the best to avoid them at all.

    As a user I hate it when I must scroll something horizontally. It's unnatural and consumes a lot of time.

    Just use this layout:
    Code:
    Item name:
    [____________________] 
    
    Item length:          Item width:
    [__________]          [__________]
    
    Extra items (list):
    [ Extra item #1 ]
    [ Extra item #2 ]
    [ Extra item #3 ]
    [ Extra item #4 ]
    
    
    etc

  5. #5

    Thread Starter
    Frenzied Member toecutter's Avatar
    Join Date
    Apr 2006
    Location
    Brisbane, Australia
    Posts
    1,160

    Re: Single Row DataGridView

    Quote Originally Posted by cicatrix View Post
    If you need one row only then why use datagridview at all? Use several text/combo boxes on a form.
    You can place them in any order and make any layout.
    done that
    thx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width