1 Attachment(s)
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 :mad: :mad: :mad:
I have attached code which drives me crazy. Look at column 'result' on frm2.
sample is in vb 2005.
please help.
regards,
sweet_dreams
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.
Re: strange problem with DataGridViewButtonColumn
thanks kartam for your reply but it doesn't work.
Any other ideas?
regards,
sweet_dreams