Results 1 to 3 of 3

Thread: strange problem with DataGridViewButtonColumn

  1. #1

    Thread Starter
    Addicted Member sweet_dreams's Avatar
    Join Date
    Apr 2005
    Location
    Poland, Lodz
    Posts
    189

    Angry strange problem with DataGridViewButtonColumn

    Hi all,

    I have recently encountered such a problem:

    I have 3 forms: frmparent, frm1 and frm2. I open frm1 from frmparent and frm2 can be opened by clicking button on frm1. frm1 and frm2 are child forms of frmparent

    on frm2 I have DataGridView which one column is DataGridViewButtonColumn.
    text on each button in each row of DataGridView is added programmatically when the form is loaded (because this text depends on some other variable.) And here is the problem: when I open frm2 as a child form of frmparetn the text isn't displayed on buttons. But when I open frm2 not as a child form of frmparet everything is OK.
    Have you got some ideas why is it??? I spent whole day trying to solve it without any results

    I have attached code which drives me crazy. Look at column 'result' on frm2.
    sample is in vb 2005.

    please help.

    regards,
    sweet_dreams
    Attached Files Attached Files
    Last edited by sweet_dreams; Jul 5th, 2006 at 12:35 PM.
    using VB 2010 .NET Framework 4.0; MS Office 2010; SQL Server 2008 R2 Express Edition | Remember to mark resolved threads and rate useful posts.

  2. #2
    Member
    Join Date
    Oct 2005
    Location
    C:\Downloads at 87.105.109.239
    Posts
    39

    Re: strange problem with DataGridViewButtonColumn

    Maybe try to refresh form, or something like that. There is another way but i'm not sure it will help.
    After executing frm2.Show() start a thread based on a sub that will check the Result column (and if it will be empty as in the example, it should fill it with data). I don't know DataGrids as I can't write data-based programs, so I won't attach example code. But try the threading method out.
    If my post is helpful please RATE IT! Thanks

  3. #3

    Thread Starter
    Addicted Member sweet_dreams's Avatar
    Join Date
    Apr 2005
    Location
    Poland, Lodz
    Posts
    189

    Re: strange problem with DataGridViewButtonColumn

    thanks kartam for your reply but it doesn't work.
    Any other ideas?

    regards,
    sweet_dreams
    using VB 2010 .NET Framework 4.0; MS Office 2010; SQL Server 2008 R2 Express Edition | Remember to mark resolved threads and rate useful posts.

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