Results 1 to 4 of 4

Thread: DataGridView Question

  1. #1

    Thread Starter
    New Member Smark's Avatar
    Join Date
    Aug 2005
    Location
    127.0.0.1
    Posts
    4

    DataGridView Question

    Hey everyone,
    Ive been using VB4-6 for years, and I recently moved to VB.NET. I have a MultiDimension Array: CodeGrid(0 to 40, 0 to 0)

    Now, is there an easy way to simply dump that array into a DataGridView? If not, how can I edit, and add rows to the DGV?

    Thanks,
    Smark
    Currently Working On:
    - Visual Basic: IRCd
    - Visual Basic: Snake Game
    - C/C++: Address Book

    Currently Learning:
    - Unix (Ubuntu To Be Exact)
    - C/C++
    - PHP

  2. #2
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: DataGridView Question

    Quote Originally Posted by Smark
    Hey everyone,
    Ive been using VB4-6 for years, and I recently moved to VB.NET. I have a MultiDimension Array: CodeGrid(0 to 40, 0 to 0)

    Now, is there an easy way to simply dump that array into a DataGridView? If not, how can I edit, and add rows to the DGV?

    Thanks,
    Smark
    Hi,

    Here's a link how to add columns and rows into a datagridview:

    http://msdn2.microsoft.com/en-us/lib...ew(VS.80).aspx

    Wkr,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

  3. #3

    Thread Starter
    New Member Smark's Avatar
    Join Date
    Aug 2005
    Location
    127.0.0.1
    Posts
    4

    Re: DataGridView Question

    Thanks for your Response... It worked perfectly.

    Now Ive got another issue that I need some help on... I now have a table full of Data. I need to sort it. Ive got 3 columns: Amount, Code, and Summary.

    I would like to sort it by Amount, which can be easily done by double-clicking the Column Header. But is there an easy way to sort these in code? I dont need any special sorting order just 5, 2, 4, changed to 5, 4, 2...

    Thanks,
    Smark
    Currently Working On:
    - Visual Basic: IRCd
    - Visual Basic: Snake Game
    - C/C++: Address Book

    Currently Learning:
    - Unix (Ubuntu To Be Exact)
    - C/C++
    - PHP

  4. #4
    PowerPoster VBDT's Avatar
    Join Date
    Sep 2005
    Location
    CA - USA
    Posts
    2,922

    Re: DataGridView Question

    Take a look on DataGridView.Sort method.

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