Hi i have webheirarchical datagrid which datasource will come from an objectdatasource.
Now i have problem on linking this two:
PARENT:
<asp:ObjectDataSource ID="odsPatent" runat="server"
SelectMethod="GetParent" TypeName="ClassLibrary1.Class1">
</asp:ObjectDataSource>
CHILD:
<asp:ObjectDataSource ID="odsChild" runat="server"
SelectMethod="GetChild" TypeName="ClassLibrary1.Class1">
<SelectParameters>
<asp:ControlParameter ControlID="WebHierarchicalDataGrid1" DefaultValue="0"
Name="ParentId" PropertyName="ParentId" Type="Int32" />
</SelectParameters>
WebHierarchicalDataSource:
<ig:WebHierarchicalDataSource ID="WebHierarchicalDataSource1" runat="server">
<DataViews>
<ig:DataView ID="odsParent_DefaultView" DataMember="DefaultView"
DataSourceID="odsParent" />
</DataViews>
</ig:WebHierarchicalDataSource>
where WebHierarchicalDataSource cant link the two datasources.
Hi NewbApps,
Thank you for posting in the community.
You should be able to specify both your parent and child ObjectDataSources as DataViews in a WebHierarchicalDataSource. Afterwards you need to define the relation between them. For instance:
<ig:WebHierarchicalDataSource ID="WebHierarchicalDataSource1" runat="server"> <dataviews> <ig:DataView ID="parentObjectDataSource_DefaultView" DataMember="DefaultView" DataSourceID="categoryObjectDataSource" /> <ig:DataView ID="childObjectDataSource_DefaultView" DataMember="DefaultView" DataSourceID="categoryObjectDataSource0" /> </dataviews> <datarelations> <ig:DataRelation ChildColumns="Id" ChildDataViewID="childObjectDataSource_DefaultView" ParentColumns="Id" ParentDataViewID="parentObjectDataSource_DefaultView" /> </datarelations> </ig:WebHierarchicalDataSource>
Please tell me if this helps.
Hi Petar I gotIput String was in the correct format. How to set up control parameter of my WHDG to my childobjectdatasource. maybe im missing something.
<asp:ObjectDataSource ID="odsParent" runat="server"
SelectMethod="GetParent" TypeName="ClassLibrary1">
SelectMethod="getChildByParentId"
TypeName="ClassLibrary1">
<asp:ControlParameter ControlID="WebHierarchicalDataGrid1"
PropertyName="DataKeyFields" Name="ParentId"
Type="Int32"/>
WEB HDS:
DataSourceID="odsParent " />
<ig:DataView ID="odsChild_DefaultView" DataMember="DefaultView"
DataSourceID="odsChild" />
<datarelations>
<ig:DataRelation ChildColumns="ParentId"
ChildDataViewID="odsChild_DefaultView" ParentColumns="ParentId"
ParentDataViewID="odsParent_DefaultView" />
</datarelations>
Can you give sample app about this sir.
And also: how to enable rowbumbering of child band using manual on load demand?
Thanks in Regards