Results 1 to 5 of 5

Thread: DGV load

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2011
    Posts
    198

    DGV load

    Hi all

    I have an unbound DataGridView

    I want to be able to add just a few rows in one specific column, save this to My.Settings, and be able to load those words back into the DGV at the press of a button, make any changes, then re-save in My.Settings.

    I don't want to have to bind my DGV to a source.

    Help is appreciated.

  2. #2
    Addicted Member Lectere's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    222

    Re: DGV load

    datagridview is made out of datagridrows and these are made up out of cell's!

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2011
    Posts
    198

    Re: DGV load

    Thanks for the reply. So is there anyway of saving the text entered into cells to be re-loaded when the form reopens?

  4. #4
    New Member
    Join Date
    Dec 2004
    Posts
    10

    Re: DGV load

    In the form settings you should be able to click browse and select another data type.
    I don't know if you can use set the My.Setting type as Datagrid. It is System.windows.forms.

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,302

    Re: DGV load

    Store the values in a StringCollection in My.Settings. Loop through the collection and add rows to the grid at startup. Loop through the rows of the grid and add the values to the collection at shutdown.

Tags for this Thread

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