471,601 Members | 1,744 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,601 software developers and data experts.

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 2825

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
reply views Thread by leo001 | last post: by
reply views Thread by MichaelMortimer | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.