Cool Tech Girl

This will be the techie me. Any problems, issues or ideas I come across during my day to day life as a Software Engineer will be posted here.

Google
 
Web This Blog

Wednesday, August 03, 2005

Big red cross(X) on datagrid in .NET

Sometimes when you load a datagrid, you get a big red cross instead of any data. There may be numerous reasons to this, most related to data binding etc.
But the one I came across seems to only happen if your .NET application is an add-on in other applications such as VB6 or Outlook and only on Windows 2000. I got a specific error - "Invalid Parameter used". My grid showed up perfectly on Windows XP. Even without any data binding, the red X always showed up. Finally after doing various permutation-combination of searches on google groups, I hit the jackpot. One post said to set the ParentRowsVisible to False and it worked. If you have hierarchical rows in your grid, this solution is not for you. But for most other type of grids this should work. I am sure there should be some other solution like finding what is actually missing in Windows 2000 that passes in an invalid parameter to the DrawRectangle function when drawing the parent rows and why does it happen when accessing through another application.
If you happen to know or have any ideas, I would appreciate the feedback

0 Comments:

Post a Comment

<< Home