Hi,
I'm being given data from our DAL which returns properties, such as ParentContent.ID, however when I pass this to the TreeView it fails on databind, please see my below code:
At run time I get a NotSupportedException saying it can't find the property ParentContent.ID. I have checked to make sure the property exists and is accessible. Please let me know if there is a way to get the TreeView control to accept properties like this?
I had this working with our previous DAL, so am confident that everything else is working correctly.
Many thanks.
I'm being given data from our DAL which returns properties, such as ParentContent.ID, however when I pass this to the TreeView it fails on databind, please see my below code:
this
.rtv_LeftMenu.DataSource = contentList;
this
.rtv_LeftMenu.DataTextField =
"Title"
;
this
.rtv_LeftMenu.DataFieldID =
"ID"
;
this
.rtv_LeftMenu.DataValueField =
"ID"
;
this
.rtv_LeftMenu.DataFieldParentID =
"ParentContent.ID"
;
this
.rtv_LeftMenu.Style.Add(
"margin"
,
"5"
);
this
.rtv_LeftMenu.Style.Add(
"padding"
,
"5"
);
this
.rtv_LeftMenu.DataBind();
At run time I get a NotSupportedException saying it can't find the property ParentContent.ID. I have checked to make sure the property exists and is accessible. Please let me know if there is a way to get the TreeView control to accept properties like this?
I had this working with our previous DAL, so am confident that everything else is working correctly.
Many thanks.