468,549 Members | 2,006 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,549 developers. It's quick & easy.

HELP! with DataGridView (Virtual Mode)

I'm creating a UserControl that uses a DataGridView in virtual mode.
It was working fine other than a few bugs. After I fixed those few
bugs, I broke it.

I have a cache of 50 records. The UserControl loads two pages of the
cache (100 records). The DataGridView.RowCount is set to 101. When I
scroll down to the third page, the cache raises an event indicating
that the RowCount needs to be updated. The DataGridView captures the
event and will increase the RowCount to what it's supposed to do. All
of this was working.

I don't know what I did, but now it is not working. When the event is
captured and I set the DataGridView.RowCount = 150, the following
error occurs:

Run-time exception thrown: System.InvalidOperationException -
Operation cannot be performed in this event handler.

I have no idea why I cannot set the new RowCount in this event. The
frustrating part is that it was working. I'm going to have to try and
get a back up of over a week ago if this cannot be resolved.

Any help would be greatly appreciated.

Feb 6 '07 #1
0 2703

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Tom | last post: by
4 posts views Thread by Sarir Khamsi | last post: by
6 posts views Thread by wukexin | last post: by
7 posts views Thread by Corepaul | last post: by
5 posts views Thread by Steve | last post: by
8 posts views Thread by Mark | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.