TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
da ra
NA
1
2.2k
DataGridView, Virtual Mode and lagging
Nov 24 2011 7:42 AM
My code looks as follows:
private void dataGridView4_CellValueNeeded(object sender, DataGridViewCellValueEventArgs e)
{
Records recordsTmp = null;
recordsTmp = (Records)this.ArrayOfRecords[e.RowIndex]; //ArrayList with string[] objects inside
switch (dataGridView4.Columns[e.ColumnIndex].HeaderText)
{
case "#":
e.Value = recordsTmp .nr;
break;
case "ip":
e.Value = recordsTmp .Ip;
break;
case "long":
e.Value = recordsTmp .Long;
break;
case "3":
e.Value = recordsTmp .type;
break;
case "4":
e.Value = customerTmp.time;
break;
}
dataGridview is updating dynamically like 10 new records per 1 secs. theres another piece of code thats adding new records(string []) to the ArrayOfRecords
So theres no problem with 2000 records. But with 8000 when im trying to select a row it needs like 4 secs to do it. The time is decreasing as im selecting lower rows. Like 1000 - 0,5 s to select/4000 - 2 secs etc. Why it takes so much time? And the 2nd thing why it raises CellValueNeededevent when im moving my mouse over the rows?(its a waste of resources) ?
Reply
Answers (
0
)
Can not create object of specified Activex control
Identify which Foo method will be called.