RadTagCloud supports binding to various types of data sources, including declarative datasources. Table-based DataSource components can be used to bind the TagCloud declaratively at design time.
Below are the properties and methods related to data binding:
-
DataSource - Set to an instance of your data source. This is mandatory when binding the RadTagCloud at runtime.
-
DataSourceID - Set to the ID of your data source. This is mandatory when binding the RadTagCloud declaratively.
-
DataMember - If the data source is a DataSet and DataMember is set, then the RadTagCloud is bound to the DataTable with the respective name in the DataSet. If DataMember is not set, the TagCloud is bound to the first DataTable in the DataSet.
-
DataTextField - This is the field name from the data source that populates each item's Text property during binding.
-
DataWeightField - This is the field name from the data source that populates each item's Weight property during binding.
-
DataNavigateUrlField - This is the field name from the data source that populates each item's NavigateUrl property during binding.
-
DataBind - Call this method after you have set the aforementioned properties when binding at runtime. This method is mandatory for binding at runtime.