Binding LLBL entity to treeview MS Visual Studio

Posts   
 
    
Silkmane
User
Posts: 1
Joined: 03-Jun-2011
# Posted on: 03-Jun-2011 20:11:44   

Hi guys, this has probably already been answered, but here goes

I have created my entity using LLBL and am trying to bind it as a datasource to a treeview control on a web form in Visual Studio. Here's the basis of my asp code <body>

<form id="form1" runat="server"> <asp:TreeView ID="TreeView1" runat="server" DataSourceID="LLBLGenProDataSource1"> </asp:TreeView> </form>

</body> <llblgenpro:LLBLGenProDataSource2 ID="LLBLGenProDataSource1" runat="server"> </llblgenpro:LLBLGenProDataSource2>

when I run it, I keep getting the errormessage - The 'DataSource' property cannot be set declaratively.

What am I doing wrong here...?

Thanks in advance

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 03-Jun-2011 20:56:35   

Silkmane wrote:

<body>

<form id="form1" runat="server"> <asp:TreeView ID="TreeView1" runat="server" DataSourceID="LLBLGenProDataSource1"> </asp:TreeView> </form>

</body> <llblgenpro:LLBLGenProDataSource2 ID="LLBLGenProDataSource1" runat="server"> </llblgenpro:LLBLGenProDataSource2>

I think you are missing some properties in the treeView. Also, the LLBLGenProDatasource is not pointing to any factory. Try to setup it in design view to facilitate this.

Silkmane wrote:

when I run it, I keep getting the errormessage - The 'DataSource' property cannot be set declaratively

Weird. As you are setting DataSourceID, not DataSource property. Do you have the same problem if you bind to another object (other classes or an ObjectDataSource) ?

David Elizondo | LLBLGen Support Team