This is a migrated thread and some comments may be shown as answers.

DataMember property not implemented?

1 Answer 110 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Brian Chavez
Top achievements
Rank 2
Brian Chavez asked on 17 Feb 2008, 09:03 AM

Hi,

I'm trying to use a Hierarchical DataSource of domain objects with the RadTreeView control.

I've set the DataSource, DataMember, DataTextField, and DataValueField in the markup on my ASPX page for the RadTreeView control...

However, it does not appear that the RadTreeView control is using the "DataMember" field to access a particular property of the Hierarchy Data Object that I want to use.

After taking a look at the stack trace here:

[HttpException (0x80004005): DataBinding: ******.UI.WebControls.DomainObjectHierarchyData' does not contain a property with the name 'Name'.]
   System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName) +197
   System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName, String format) +11
   Telerik.Web.UI.ControlItem.PopulateFromDataItem(PropertyDescriptorCollection properties, Object dataItem, String dataMember, Int32 depth) +215
   Telerik.Web.UI.NavigationItem.PopulateFromDataItem(PropertyDescriptorCollection properties, Object dataItem, String dataMember, Int32 depth) +76
   Telerik.Web.UI.RadTreeNode.PopulateFromDataItem(PropertyDescriptorCollection properties, Object dataItem, String dataMember, Int32 depth) +64
   Telerik.Web.UI.ControlDataBinder.SetItemPropeties(ControlItem item, Object dataItem, String dataMember, Int32 depth) +73
   Telerik.Web.UI.ControlDataBinder.BindItem(ControlItemCollection items, Object dataObject, Object dataItem, String dataMember, Int32 depth) +92

....

I looked at Telerik.Web.UI.ControlItem.PopulateFromDataItem() method and I noticed that the ControlItem.PopulateFromDataItem() does not respect the "dataMember" parameter that is being passed in.

Is this a limitation of the "Beta" "Prometheus" RadControls?

Thanks,
Brian

1 Answer, 1 is accepted

Sort by
0
Brian Chavez
Top achievements
Rank 2
answered on 17 Feb 2008, 11:40 AM
Sorry, it was a lack of understanding of how DataBinding was working. 

Got it working now, thanks.
Tags
TreeView
Asked by
Brian Chavez
Top achievements
Rank 2
Answers by
Brian Chavez
Top achievements
Rank 2
Share this question
or