Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
425
WebExplorerBar binding to WebHierarchicalDataSource and ObjectDataSource
posted

I am having a problem binding WebExplorerBar to WebHierarchicalDataSource and ObjectDataSource, below follow the html code.

I have 2 tables related with each other. Curso table with 3 records and Serie table with some records related to table Curso by idCurso foreign key.

WebExplorerBar shows the 3 Curso records as groups as expected but the problem is that it's only expanding the first group showing Serie related records, but the second and third group does not expands to show Serie related records. I have already verified and all the records from Serie table are being retrieved from database and all the 3 records from Curso has related records from Serie.

Here is the code.

<ig:WebExplorerBar ID="WebExplorerMenu" runat="server" Width="100%" Visible="true"
DataSourceID="ExplorerBarHierarchicalDataSource" GroupExpandBehavior="AnyExpandable"
BackColor="White" InitialDataBindDepth="0">
<DataBindings>
<ig:ExplorerBarItemBinding DataMember="Grupos" TextField="NomeCurso"/>
<ig:ExplorerBarItemBinding DataMember="Items" TextField="NomeSerie"/>
</DataBindings>
</ig:WebExplorerBar>

<ig:WebHierarchicalDataSource ID="ExplorerBarHierarchicalDataSource" runat="server">
<DataViews>
<ig:DataView DataSourceID="ObjectDataSourceGrupo" ID="Grupos" />
<ig:DataView DataSourceID="ObjectDataSourceItem" ID="Items" />
</DataViews>
<DataRelations>
<ig:DataRelation ParentDataViewID="Grupos" ParentColumns="idCurso" ChildDataViewID="Items" ChildColumns="idCurso"/>
</DataRelations>
</ig:WebHierarchicalDataSource>
<asp:ObjectDataSource ID="ObjectDataSourceGrupo" runat="server"
SelectMethod="GetCursos" TypeName="WintechNetEscola.Controllers.Views.Views">
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="ObjectDataSourceItem" runat="server"
SelectMethod="GetSeries" TypeName="WintechNetEscola.Controllers.Views.Views">
</asp:ObjectDataSource>