DataGrid PickerColumn
DataGridPickerColumn在编辑模式中使用Picker控件从可能的列表中选择值。
重要的特性
下面是为DataGridPickerColumn定义的特定属性:
- ItemsSource(IEnumerable
- ItemsSourcePath(string):此属性用于指定数据类的属性,以用作Picker控件的源。
- ItemDisplayBindingPath(string):设置Picker选择器中项目的显示路径。它指向Picker的ItemsSource集合中的项中的一个字段。
- PropertyName:定义对象类型的属性的名称,该对象类型表示网格中的每一行。
- HeaderText:定义要在表示列的Header UI中显示的内容。
- CellContentStyle:定义Style对象,该对象定义与此列关联的每个单元格的外观。样式的TargetType应该是TextBlock类型。
- CellContentStyleSelector:定义StyleSelector实例,允许在每个单元格的基础上动态显示。
- CellContentFormat:为每个单元格值定义自定义格式。的字符串。格式routine is used and the format passed should be in the form required by this method.
- CellContentTemplate(DataTemplate):定义与具体列关联的每个单元格的外观。CellContenTemplate让您有机会在每个数据网格列中包装文本。您可以添加一个标签作为文本,模板列的内容,并使用标签的包装其文本LineBreakMode财产。
- CellEditTemplate(DataTemplate):定义与具体列关联的编辑器。当单元格处于编辑模式时,将显示CellEditTemplate。
- FilterControlTemplate(DataTemplate):用于过滤UI的用户定义模板。模板必须包含Telerik.XamarinForms.DataGrid.DataGridFilterControlBase类的实例
更多关于CellDecorationStyle而且CellDecorationStyleSelector可在列的样式的话题。
CellContentTemplate,CellEditTemplate而且FilterControlTemplate属性是R2 2020官方发布的DataGrid特性的一部分。有关cellledit和单元格内容模板特性的详细信息,请查看细胞模板篇文章。有关过滤器控制模板的更多详细信息,请参阅FilterControl模板部分。
CellContentFormat使用框架提供的格式字符串。有关详细信息,请查看字符串。格式篇文章。
的
CellContentStyle
当CellContentTemplate
使用。
例子
< / telerikGrid: DataGridPickerColumn >