Hi,
I'm puzzled by this one, but hopefully someone can point me in the right direction.
It's a little hard to explain what is happening and I don't really know which bit of code (if any) is relevant to post.
My application consists of one main form and various others that open modally.
On the main form is a DGV, which is bound to a dataset, populated from an XML file. This displays up to 10 rows of data at one time and I think that is significant.
A couple of the other forms also include DGVs which are bound to the same source. The problem comes when I filter the data on the sub form and the filtered DGV contains less than the rows originally visible on the main form DGV. If whilst the filtered DGV is on screen I open Windows Explorer, a data error is raised relating to the DGV on the main form. It only seems to be when I try and open Windows Explorer, or My Computer. For some reason, at that point, the DGV on the main form tries to refresh itself with the filtered data and hits an error when it doesn't have sufficient data to fill the previously visible rows.
I hope that makes sense? It seems very strange and I have no idea why it happens only when I open Windows Explorer. If Windows Explorer is already open and I switch to that window, it doesn't throw the error.
Is it possible to suspend the DGV on the main form temporarily (so that it doesn't try to update itself) and then re-enable it when I switch back to the main form? That would solve the problem I think.
Thanks in advance for any suggestions.
I'm puzzled by this one, but hopefully someone can point me in the right direction.
It's a little hard to explain what is happening and I don't really know which bit of code (if any) is relevant to post.
My application consists of one main form and various others that open modally.
On the main form is a DGV, which is bound to a dataset, populated from an XML file. This displays up to 10 rows of data at one time and I think that is significant.
A couple of the other forms also include DGVs which are bound to the same source. The problem comes when I filter the data on the sub form and the filtered DGV contains less than the rows originally visible on the main form DGV. If whilst the filtered DGV is on screen I open Windows Explorer, a data error is raised relating to the DGV on the main form. It only seems to be when I try and open Windows Explorer, or My Computer. For some reason, at that point, the DGV on the main form tries to refresh itself with the filtered data and hits an error when it doesn't have sufficient data to fill the previously visible rows.
I hope that makes sense? It seems very strange and I have no idea why it happens only when I open Windows Explorer. If Windows Explorer is already open and I switch to that window, it doesn't throw the error.
Is it possible to suspend the DGV on the main form temporarily (so that it doesn't try to update itself) and then re-enable it when I switch back to the main form? That would solve the problem I think.
Thanks in advance for any suggestions.