Results 1 to 2 of 2

Thread: Problem with display of DataGridView

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2010
    Posts
    350

    Problem with display of DataGridView

    I am displaying a data table in a datagridview. I have two fields, 'key' and some 'text'.
    The 'key' field visiblity is turned off.
    When I display the form it displays only the 'text' column (as I expect).
    But if I close the form and reopen it the datagridview now displays the 'key' and the 'text' columns.

    Any suggestions why this occurs?

    Sorry, not sure if this should be posted under database forum.

  2. #2
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: Problem with display of DataGridView

    There's a lot of possibilities from where and when you declare the column visibility, create the datagridview, populate the datatable and the dgv, and handle the form. And probably a lot of other things I haven't even thought of yet. There's really no choice but to go through this line by line to find out what happens when you initially open the form that doesn't happen when you reopen it.
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

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