Page 1 of 1

Reference to DataTemplated UI object in Datagrid /BUG

Posted: Mon Sep 19, 2016 5:32 am
by Sesztak
Dear JS-Support,

We have an easy task: to change some properties of the SelectedItem under DataTemplated UI object in Datagrid => .
So, we need reference (C# code behind) to UI element under DataTemplate.

In WPF it works like:
var _Container = datagrid.ItemContainerGenerator

In CSHTML we got null value of _Container during debbugging:

_Container = null

Please, double check at your side: can you reproduce the bug ?

Or antoher say: in the meantime is there any workaround to get reference of DataTemplated UI object in Datagrid.
E.g. we would like to set forecolor of TextBlock from Grey to Red in case of Server sent event occur.

Thanks for your kind reply,
Best Regards,