This question is locked. New answers and comments are not allowed.
Hi,
I have a RadGridView on my page to show some records, a HierarchyChildTemplate creation and two DomainDataSources for each grid.
If I click on the expand icon in front of my record, the second grid will expand with other records, but I have to send them along a dynamic QueryParameter like the ID of my expanded row to, fill my Childgrid with new records via a DomainService.
So I have only two tables with a 1:n Relationship.
The value of the QueryParameter is "22" and now I need to give the Value the id of the row which I have expanded to fill my childgrid with new records. I can not use javascript.
Is it possible with an other way?
Greetz Beethoven
I have a RadGridView on my page to show some records, a HierarchyChildTemplate creation and two DomainDataSources for each grid.
<telerik:RadGridView Margin="6,48,6,167" Name="pakets" ItemsSource="{Binding ElementName=paketSetDomainDataSource, Path=Data}" AutoGenerateColumns="False"> <telerik:RadGridView.ChildTableDefinitions> <telerik:GridViewTableDefinition> <telerik:GridViewTableDefinition.Relation> <telerik:PropertyRelation ParentPropertyName="Id"/> </telerik:GridViewTableDefinition.Relation> </telerik:GridViewTableDefinition> </telerik:RadGridView.ChildTableDefinitions> <telerik:RadGridView.Columns> <telerik:GridViewDataColumn DataMemberBinding="{Binding Id}" Header="PaketID" /> <telerik:GridViewDataColumn DataMemberBinding="{Binding AbsName}" Header="Absender" /> </telerik:RadGridView.Columns> <telerik:RadGridView.HierarchyChildTemplate> <DataTemplate> <telerik:RadGridView Name="stati" ItemsSource="{Binding ElementName=statusSetDomainDataSource, Path=Data}" AutoGenerateColumns="False"> <telerik:RadGridView.Columns> <telerik:GridViewDataColumn DataMemberBinding="{Binding Paket_Id}" Header="StatusID" /> </telerik:RadGridView.Columns> </telerik:RadGridView> </DataTemplate> </telerik:RadGridView.HierarchyChildTemplate> </telerik:RadGridView><riaControls:DomainDataSource PageSize="10" AutoLoad="True" d:DesignData="{d:DesignInstance my1:PaketSet, CreateList=true}" Height="0" LoadedData="paketSetDomainDataSource_LoadedData" Name="paketSetDomainDataSource" QueryName="GetPaketSetsQuery" Width="0"> <riaControls:DomainDataSource.DomainContext> <my:TrackingModelDomainContext /> </riaControls:DomainDataSource.DomainContext> </riaControls:DomainDataSource> <riaControls:DomainDataSource PageSize="10" AutoLoad="True" d:DesignData="{d:DesignInstance my1:StatusSet, CreateList=true}" Height="0" LoadedData="statusSetDomainDataSource_LoadedData" Name="statusSetDomainDataSource" QueryName="GetStatusSetsQuery" Width="0"> <riaControls:DomainDataSource.DomainContext> <my:TrackingModelDomainContext /> </riaControls:DomainDataSource.DomainContext> <riaControls:DomainDataSource.QueryParameters> <riaControls:Parameter ParameterName="id" Value="22" ></riaControls:Parameter> </riaControls:DomainDataSource.QueryParameters> </riaControls:DomainDataSource>If I click on the expand icon in front of my record, the second grid will expand with other records, but I have to send them along a dynamic QueryParameter like the ID of my expanded row to, fill my Childgrid with new records via a DomainService.
public class TrackingModelDomainService : LinqToEntitiesDomainService<GoTrackingSystemEntities>{ // TODO: // Consider constraining the results of your query method. If you need additional input you can // add parameters to this method or create additional query methods with different names. // To support paging you will need to add ordering to the 'PaketSets' query. public IQueryable<PaketSet> GetPaketSets() { return this.ObjectContext.PaketSets; } // TODO: // Consider constraining the results of your query method. If you need additional input you can // add parameters to this method or create additional query methods with different names. // To support paging you will need to add ordering to the 'StatusSets' query. public IQueryable<StatusSet> GetStatusSets(int id) { return this.ObjectContext.StatusSets.Where(cell => cell.Paket_Id.Equals(id)); }}So I have only two tables with a 1:n Relationship.
The value of the QueryParameter is "22" and now I need to give the Value the id of the row which I have expanded to fill my childgrid with new records. I can not use javascript.
Is it possible with an other way?
Greetz Beethoven