You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the LoadingRow event of controls of type DataGrid to perform some individual actions to specific rows.
private void DataGrid_OnLoadingRow(object? sender, DataGridRowEventArgs e)
{
var context = e.Row.DataContext as TaskNode;
var n = (int)Math.Log10(ViewModel.NodesList.Count) + 1;
var format = new string('0', n);
var margin = new string(' ', 3);
e.Row.Header = (e.Row.Index + 1).ToString(format) + margin;
if (context?.Color is not null)
{
e.Row.Bind(ForegroundProperty,
new Binding("Brush")
}
}
As I am now trying out TreeDataGrid I am wondering how to achieve the same functionality since there is no LoadingRow event for TreeDataGrid. I am especially asking for individually coloring rows by value.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am using the
LoadingRow
event of controls of typeDataGrid
to perform some individual actions to specific rows.As I am now trying out
TreeDataGrid
I am wondering how to achieve the same functionality since there is no LoadingRow event forTreeDataGrid
. I am especially asking for individually coloring rows by value.Any suggestions?
Joachim
Beta Was this translation helpful? Give feedback.
All reactions