Results 1 to 9 of 9

Thread: Any controls can do this??

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2006
    Posts
    125

    Question Any controls can do this??

    [IMG][/IMG]

    Hi,Is any controls can do it this way? I am using VS2008, vb.net.
    traditionally the grid column and row is display in vertically, how if i want is display in horizontally??
    The field must be editable, not read only.
    Appreciated if any advice..

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Any controls can do this??

    So, you want a set number of rows and a variable number of columns? There's nothing built into the .NET Framework designed to do that. You could get a DataGridView to display data like that, although it's not natural so it would take a bit of fiddling. There may be third-party grids around that can do it, but they would most likely not be free.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Dec 2006
    Posts
    125

    Re: Any controls can do this??

    That is fixed only 2 colums (Named "No","Bit") , I only want the rows keep adding to right instead of traditional keep adding to bottom, i want to confirm that is no any build in .NET framework3.5?
    The only way i can do is look for 3rd party?
    i am trying datagridview, but failed to explore it. or i missed something?
    Last edited by jackeng1983; Nov 14th, 2010 at 10:27 PM.

  4. #4
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: Any controls can do this??

    the listview control has that functionality.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Dec 2006
    Posts
    125

    Re: Any controls can do this??

    but i thought listview is cant be editable? readonly?

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Any controls can do this??

    Quote Originally Posted by Lord Orwell View Post
    the listview control has that functionality.
    No it doesn't. A ListView has column headers and no row headers. To add data horizontally instead of vertically you would have to add a new ColumnHeader and then a new subitem to each existing item. For a control to actually support that functionality it would have to allow you to add a single item to a collection to add a new column visually, which is not possible with the ListView.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  7. #7
    Banned
    Join Date
    Nov 2010
    Location
    texas
    Posts
    4

    Re: Any controls can do this??

    no controls do this i think

  8. #8
    Frenzied Member
    Join Date
    Jan 2010
    Location
    Connecticut
    Posts
    1,687

    Re: Any controls can do this??

    You can always create your own control to do just that.
    VB6 Library

    If I helped you then please help me and rate my post!
    If you solved your problem, then please mark the post resolved

  9. #9
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: Any controls can do this??

    Quote Originally Posted by jackeng1983 View Post
    but i thought listview is cant be editable? readonly?
    it's not readonly. It however can only be edited through code. To do what you wanted, you would have to have the metrics of the location of each field and display a textbox there whenever you clicked on that spot. I did this with a program on dvd information once. I had a custom field for notes. It worked fine but if you are wanting the dotted lines between the rows you can't do that.
    You could however shade every other row like an accounting sheet.

    as jmclhinley said, it doesn't really have row headers, but you could use the primary key that way because every field can have custom fonts and background colors. the left side could be made to look like it.

    the reason i suggested that control is the fact any new subitem you add will appear on the far right. However if you need the full editing functionality, you may be better off with the grid control, since it already incorporates the textbox.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

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