
Hi, I can't get item editing working in my TreeListView.
I'm using an ItemAdapter without a RootItem Binding, i.e. RootItem is set to the ModelView of the page and the ItemAdapter GetChildren returns the heirarchical data from the ViewModel.
The TreeListViewColumn DisplayMemberBinding has Mode=TwoWay. Do I need more then that to tell the TreeListView that the column is potentially editable?
The ItemAdapter GetIsEditable is never called, so none of the cells are editable. Also, some of the items (rows) of the treelistview are readonly so I need to give visual cues to the user which rows are editable, like different background and font weight. I have tried binding a Style DataTrigger for this without success.
My items inherent from a class with implementation taken from the TreeNodeModel sample with an added property for the DataTrigger:
public bool IsReadOnly => !IsEditable;
This is the Cell Style:
<Style x:Key="TreeListViewCell" TargetType="grids:TreeListViewItemCell">
<!--<Setter Property="TextBlock.Background" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrush}}"/>-->
<!--<Setter Property="TextBlock.FontWeight" Value="Bold"/>-->
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsReadOnly}">
<Setter Property="TextBlock.FontWeight" Value="Bold"/>
</DataTrigger>
</Style.Triggers>
</Style>
I can't seem to get it work, either using the ItemAdapter GetIsEditable or through bindings.
Thanks for any advice.