c# - Changing a cell in a row of a DataGrid(WPF) is changing cells in rows below -


i trying change background of errorneous data containing cells in wpf datagrid using code:

datagridrow gridrow = dginventory.itemcontainergenerator.containerfromindex(0) datagridrow; datagridcell cell = dginventory.columns[1].getcellcontent(gridrow).parent datagridcell;  cell.background = brushes.gray;  gridrow.isselected = true; gridrow.focus(); 

however, upon doing this, above change of background-color change occuring cells in same column, periodically after every 14 (aprox.) rows scroll down datagrid. intended modify background of single row. can please provide fix problem? in advance.

try using this:

<datagrid name="simpledatagrid" scrollviewer.cancontentscroll="false" ... /> 

for scrolls in terms of physical units. datagrid cancontentscroll enabled default.

for more information see msdn.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -