I have been having difficulty interacting with a "wpf" datagrid.
In the code, I add a DataGrid to the "System.Windows.Controls.Grid"
I have populated the grid with some market prices and chart info. Thats all works fine and updates as expected in real time, very nice.
What i am having major issues with is simply setting the background color of a particlar cell. dataGrid1 does in fact exist and I can get a return on the items count for the DataGrid using:dataGrid1.ItemContainerGenerator.Items.Count
THE ISSUE - But i can not seem to get a "reference" to the rows or columns of dataGrid1 to change the background color; and any attempts to interact with the rows/cells using the functions GetCell and GetVisualChild, ends with the platform bombing out. The try catch in the code fails to catch the exception.
This is my first endeavour with WPF and the datagrid, I have used windows forms for years and this is totally baffling me. Also i appreciate this is likely unsupported code, but i would really appreciate anyones' comments or advise.
Caution: Un-commenting the try catch in the OnBarUpdate event is likely to cause the platform to stop responding.
Attached Indicator: devGrid.zip
Comment