When I user CellValuePresenter to set one of records's style by vb code(for example:font color=red),It's works ok,but when I scroll the scrollbar (records is large) ,the row i has setted CellValuePresenter will works correctly.
would you give me some code to solved it!
thanks!
Hello,
This is because of the XamDataGrid's virtualization. When records are scrolled out of and in view, they are recreated and therefore the properties that you have set locally are lost. You can bind the properties that you want to set using (IValueConverter) or turn off the XamDataGrid's Virtualization (RecordContainerGenerationMode=PreaLoad) however, this is recommended if you do not expect to have many records.
1. set RecordContainerGenerationMode=PreaLoad
2.click search button and setdatasource to xamdatagrid,then set cell style for some special records
3.record's style was changed that in view,but the record's style will not changed if it's not in the view