Cannot clear this list (datagrid.Rows.Clear) RRS feed

  • Question

  • Hi,
    I have a datagrid object that is filled with data when the app starts. That works fine but when I coded Refresh action, I would need to erase datagrid object so I call:







    While Columns.Clear works fine, Rows.Clean always throws an exception that the list cannot be cleared. I dont know why.
    Thank you!

    Friday, October 2, 2009 10:22 AM


  • Why do you need to clear the rows setting a new datasource do not append new records.

    You can set new datasource
    set datasource to null.
    • Marked as answer by Blizna Friday, October 2, 2009 10:48 AM
    Friday, October 2, 2009 10:38 AM

All replies