我能够绑定SelectedItem如果选择模式是单一的,但如果它设置为多个,那么你如何绑定它?如何在mvvm中绑定多个选定项目的syncfusion xamarin表单datagrid?
这里是我试过单一选择模式
<sync:SfDataGrid Grid.Row="1" AutoGenerateColumns="False" AllowSorting="True"
AllowGroupExpandCollapse="True" AutoExpandGroups="True"
SelectionMode="Multiple" ColumnSizer="Star"
ItemsSource="{Binding LstItems}"
SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
>
<sync:SfDataGrid.Columns>
<sync:GridTextColumn HeaderText="Name" MappingName="Name" />
<sync:GridTextColumn HeaderText="MRP" MappingName="MRP"/>
<sync:GridTextColumn HeaderText="Category" MappingName="Category" Width="0"/>
</sync:SfDataGrid.Columns>
<sync:SfDataGrid.GroupColumnDescriptions>
<sync:GroupColumnDescription ColumnName="Category"/>
</sync:SfDataGrid.GroupColumnDescriptions>
</sync:SfDataGrid>
在上面的XAML中,选择模式设定为多,但我无法得到在XAML的SelectedItems这里提到
https://help.syncfusion.com/xamarin/sfdatagrid/selection
你不能在nuget中找到Xamarin.Behaviors,而是使用Corcav.Behaviors(创建Xamarin.Behaviors的开发者)。 –