Weird problem with DataGrid Scollbar in wrong place..

  • Thread starter Mike in Paradise NL
  • Start date
M

Mike in Paradise NL

I have a form with a tab control with a variety of
datagrids in various pages. In the designer VS2003 C#
project I get a null reference error(with no other
information such as what is a null reference) when
changing between two of the tab control pages in the
designer but the designer works and everything shows.

In the designer the first datagrid on the first page is
set to Dock Fill and gets resized when the form is loaded
as an MDI child window.

The problem is that on first loading the form the
dataGrid's scroll bar does not get repositioned with the
rest of the datagrid, it stays in the position that it
was in the designer, so it ends up mixed in with the
body of the grid.

If you click on the grid and do some navigation within
the grid then it fixes itself. If in the program I load
the same info into the grid again all is fine.


I am figuring that the error in VS2003 designer and the
problem are related but have no idea how to go about
tracking this down.

Anyone else run into this with the datagrid?
 
M

Mike in Paradise NL

I had a dataview as the source to the data grid but the
dataview did not get populated until the ADO objects were
activated in the program. I took away the Dataview as
the DataSource to the DataGrid and this stopped the
designer from giving the nullobjectreference error.

I am still having the DataGrid scroll bar not positioning
properly on first entry however...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top