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
Thank you for your reply.
The DataKeyFields property of WHDG is not a ControlValuePropertyAttribute and therefore cannot be used in a control parameter. Please refer to the following article for more information on the subject of control parameters:
http://msdn.microsoft.com/en-us/library/ie/xt50s8kz.aspx
Using a control parameter in this case defeats the purpose of having a DataRelation defined in the WebHierarchicalDataSource. I suggest that you consider implementing a parameter-less select method for use in your child ObjectDataSource. The relation defined in the WebHierarchicalDataSource will take care of matching up the corresponding parent and child records.
Please let me know if this helps.
Please feel free to contact me if you need further assistance.
Me and my co developers used parameters for child bands but by using manual on load demand.
We've already tried using Data views using sqldatasource and WHDSource where parent and child has no parameters with million of records and it takes really long time to load.
But if its loading is by parameters it will saves a lot of time.
Can you send us an example of WHDG with parameters for child using objectdatasource.
Something like:
Parent : ParentId,ParentName
> Child: ChildId,ParentId,ChildName
Which child has parameter @ParentId which will be supply with the parent row ParentId Column.
I have submitted a feature request for you regarding this feature which has been sent directly to our product management team. Our product team chooses new feature requests for development based on popular feedback from our customer base. We continue to monitor application development for all of our products so as trends appear in requested features, we can plan accordingly.
Your reference number for this feature request is FR13994. Should you wish to follow up on your request at a later point, you can contact Developer Support management via email at dsmanager@infragistics.com . Please include the reference number of your feature request in the subject and body of your email message.
Thank you for your request.
Thanks Petar I will try this.
When will be the excell like filter w/ (Top) be released on infragistics?
I am attaching a full sample with an WHDG using a WebHierarchicalDataSource bound to 2 ObjectDataSources with all CRUD operations implemented. In the sample you can see how parameters can be defined for the objectDataSource in such a setup (here parameters are defined for Insert and Delete but the principle is exactly the same with Select).
Please feel free to contact me if you have any questions.