DataGridView Sometimes Not Formatting

JDYoder

Centurion
Joined
Nov 18, 2003
Messages
144
I have a strange error with a DataGridView. I attached dummy code to show it. As you can see, when you click the 1st button, it loads the DGV manually with dummy data and the DGV row formatting code is applied as expected.

But when you click the 2nd button to load the DGV via a query, the DGV row formatting code does NOT apply as expected. (You can click the "Redo" format button to make it work, but I need it to work when the form loads.)

Any idea why the formatting won't take place with the 2nd method?

(BTW, the second method via the query doesn't remain bound to the DB, does it? I don't want it to, and I assume it doesn't since the DataAdapter is destroyed, but I want to know for sure.)

Thanks.
 

Attachments

Last edited:
If i understand your question then you are right. Unfortunatelly i cannot run your project as i am working on x64 WinXP so JET is not supported.
 
If i understand your question then you are right. Unfortunatelly i cannot run your project as i am working on x64 WinXP so JET is not supported.

I am running Windows 7 x64 and I can run it, as long as you change it from any CPU to x86.

I see what the problem is, however I haven't been able to find a solution either :(
 
Back
Top