This will confuse the TreeView that it is bound to flat data and the component may not render any items. Another example would be a field called Url - in case you want to perform navigation yourself through templates, you may want to set UrlField="someFakeField" so that the component does not navigate on its own.ĭo not use ParentId with hierarhical data. If you want to override such behaviors, you can set IconField="someNonExistingField". For example, a field called Icon will try to produce a Telerik icon out of those values and that may not be what you want. If your model field names match any of the default names, the component will try to use them. If some model property names match the default ones in the table above, then there is no need to configure them in a TreeViewBinding. For example, if the model properties are. Usually one binding configuration is enough. It is possible to configure different bindings for different item levels. That is why, the mappings between the model and the TreeView depend on TreeViewBinding tags.Įach TreeViewBinding tag exposes the following parameters that refer to model property names: TreeViewBinding Parameter The model properties can have different names in every application. TreeView BindingsĪll TreeView item features map to model properties. If several image/icon properties have a value, the TreeView will use only one value in the following order of precedence: ImageUrl, Icon, IconClass. If set, the TreeView will generate a link to another page in the app, or an external page.ĭefine only the model properties you need. The children's type can be different from the parent item type. Required for binding to hierarchical data. Do not use ParentId with hierarhical data.ĭefines the item's children. With hierarchical data, the TreeView renders expand icons based on Items, but HasChildren will take precedence. If true, the item will show an expand arrow. Required for binding to flat data and for load on demand. For rich content and nested components, use an item templateĭetermines whether the item has children, no matter if they are loaded or not. The above model properties have the following meaning for the TreeView: PropertyĪ unique identifier.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |