datagridview's rowcount in virtualmode

S

slg

I am using virtual mode for datagrid. After i set the rowcount property to
16000, I am receiving
datagridview 's CellValueNeeded event 16000 times for each row.
This is causing the application to hang for sometime. I am displaying only
16 rows at a time.


I am following the sample mentioned in
http://msdn2.microsoft.com/en-us/library/ms171625.aspx artile.

Can any one tell why the datagridview is quering for rows which are not
being displayed. Is this
functionality by design.

Thx
 
S

slg

Finally i figured out, Its the column autosize properties causing the
datagrid to go over the
rest of the rows to figureout the column width. Setting this property to
false fixed it.

AutosizecolumnMode = None

Thx
 

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