datagridview's rowcount in virtualmode

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • slg

    #1

    datagridview's rowcount in virtualmode

    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



  • slg

    #2
    Re: datagridview's rowcount in virtualmode

    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.

    AutosizecolumnM ode = None

    Thx

    "slg" <slg@abc.comwro te in message
    news:ehgimSIKIH A.484@TK2MSFTNG P06.phx.gbl...
    >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
    >
    >
    >

    Comment

    Working...