Retrieving the DataGridCellInfo for a whole DataGrid ?

Oct 11, 2008 at 8:55 AM

Hi everybody,

I need to retrieve the collection of DataGridCellInfo for a whole DataGrid.
Is there a better solution that the one I found (I'm sure there is...) ?

dataGrid.SelectAllCells();
List<DataGridCellInfo> temp = new List<DataGridCellInfo>(dataGrid.SelectedCells);


Thanks in advance
Philippe

 

Coordinator
Oct 14, 2008 at 1:24 PM
Could you explain your scenario for this?  The reason I ask is b/c your solution is an easy way to get the DataGridCellInfo from all cells.  Another way would be traversing the cell visuals yourself.