Hi guys, I need a "code behind" sample of how to create a hiarchical grid 3 layers and the third layer binds to one of those bindable thingies EntityQuery<sometable>
So I have the first layer bound to a single row, that drives a datarequest for the next row when expanded, which drives 1 more datarequest for a table.
I can send my whole project if you want, but it's using sql 2012 for the db backend.
Joe
Hello foxjazz,
Thank you for providing the application and the database. I succeeded in running them and on my side the hierarchy gets populated for all of the 3 levels, therefore I am not sure that I understand your requirements. Would you please provide me with some details what is the expected behavior that you are trying to achieve and some steps to reproduce the issue.
Thanks in advance.
my code download location:
code:
https://bwstage.gates.com/goodreasons/pslite.7z
database
https://bwstage.gates.com/goodreasons/pslite.bak
Ok the sample you provided was with only 1 child dataset, which is setup recursively.
Below you will find my grid format:
If you like I will send you my code, but it requires sql 2012 and requires the latest version of INfragistics and it is Silverlight.
Running into a couple of problems the grid puts in ChildItems as it's first expanded record which is unexpected. I trid making the 3rd leaf keyed with "LeafItems" but it was expecting childitems. Which just doesn't work.
Take a look at the xaml to see what fields are required for the 3rd leaf in the tree.
<ig:XamGrid Height="508" x:Name="prdAppSub" DeleteKeyAction="None" RowEnteredEditMode="prdAppAllXamGrid_RowEnteredEditMode" CellEnteredEditMode="prdAppAllXamGrid_CellEnteredEditMode" Width="900" RowExpansionChanging="prdAppSub_RowExpansionChanging"> <ig:XamGrid.Columns> <ig:TextColumn AddNewRowItemTemplateVerticalContentAlignment="Center" AllowCaseSensitiveSort="True" EditorHorizontalContentAlignment="Stretch" EditorVerticalContentAlignment="Stretch" FixedIndicatorDirection="{x:Null}" HeaderText="System" IsFilterable="True" IsFixable="True" IsGroupable="True" IsHideable="True" IsMovable="True" IsResizable="True" IsSortable="True" IsSummable="True" Key="datastr" VerticalContentAlignment="Center" IsReadOnly="True"> <ig:TextColumn.FilterColumnSettings> <ig:FilterColumnSettings FilterCaseSensitive="False" FilterCellValue="{x:Null}" FilterMenuClearFiltersString="{x:Null}" FilterMenuTypeSpecificFiltersString="{x:Null}" FilteringOperand="{x:Null}"> <ig:FilterColumnSettings.FilterMenuOperands> <ig:FilterMenuTrackingObject IsChecked="False" IsSeparator="False" Label="Custom Filters"> <ig:FilterMenuTrackingObject.Children> <ig:FilterMenuTrackingObject IsChecked="False" IsSeparator="False" Label="Equals..."> <ig:FilterMenuTrackingObject.FilterOperands> <ig:EqualsOperand DisplayName="Equals..." Icon="{x:Null}" /> </ig:FilterMenuTrackingObject.FilterOperands> </ig:FilterMenuTrackingObject> <ig:FilterMenuTrackingObject IsChecked="False" IsSeparator="False" Label="Not Equals..."> <ig:FilterMenuTrackingObject.FilterOperands> <ig:NotEqualsOperand DisplayName="Not Equals..." Icon="{x:Null}" /> </ig:FilterMenuTrackingObject.FilterOperands> </ig:FilterMenuTrackingObject> </ig:FilterMenuTrackingObject.Children> </ig:FilterMenuTrackingObject> </ig:FilterColumnSettings.FilterMenuOperands> </ig:FilterColumnSettings> </ig:TextColumn.FilterColumnSettings> <ig:TextColumn.SummaryColumnSettings> <ig:SummaryColumnSettings /> </ig:TextColumn.SummaryColumnSettings> </ig:TextColumn> <ig:TextColumn AddNewRowItemTemplateVerticalContentAlignment="Center" AllowCaseSensitiveSort="True" EditorHorizontalContentAlignment="Stretch" EditorVerticalContentAlignment="Stretch" FixedIndicatorDirection="{x:Null}" IsFilterable="True" IsFixable="True" IsGroupable="True" IsHideable="True" IsMovable="True" IsResizable="True" IsSortable="True" IsSummable="True" Key="Id" VerticalContentAlignment="Center" Visibility="Collapsed" IsReadOnly="True"> <ig:TextColumn.FilterColumnSettings> <ig:FilterColumnSettings FilterCaseSensitive="False" FilterCellValue="{x:Null}" FilterMenuClearFiltersString="{x:Null}" FilterMenuTypeSpecificFiltersString="{x:Null}" FilteringOperand="{x:Null}"> <ig:FilterColumnSettings.FilterMenuOperands> <ig:FilterMenuTrackingObject IsChecked="False" IsSeparator="False" Label="Custom Filters"> <ig:FilterMenuTrackingObject.Children> <ig:FilterMenuTrackingObject IsChecked="False" IsSeparator="False" Label="Equals..."> <ig:FilterMenuTrackingObject.FilterOperands> <ig:EqualsOperand DisplayName="Equals..." Icon="{x:Null}" /> </ig:FilterMenuTrackingObject.FilterOperands> </ig:FilterMenuTrackingObject> <ig:FilterMenuTrackingObject IsChecked="False" IsSeparator="False" Label="Not Equals..."> <ig:FilterMenuTrackingObject.FilterOperands> <ig:NotEqualsOperand DisplayName="Not Equals..." Icon="{x:Null}" /> </ig:FilterMenuTrackingObject.FilterOperands> </ig:FilterMenuTrackingObject> </ig:FilterMenuTrackingObject.Children> </ig:FilterMenuTrackingObject> </ig:FilterColumnSettings.FilterMenuOperands> </ig:FilterColumnSettings> </ig:TextColumn.FilterColumnSettings> <ig:TextColumn.SummaryColumnSettings> <ig:SummaryColumnSettings /> </ig:TextColumn.SummaryColumnSettings> </ig:TextColumn> <ig:TextColumn Key="Level" Visibility="Collapsed" IsReadOnly="True" /> <ig:TextColumn Key="ApplicationSystem" Visibility="Collapsed" IsReadOnly="True" /> <ig:ColumnLayout Key="ChildItems" HeaderVisibility="Collapsed" > <ig:ColumnLayout.Columns> <ig:TextColumn Key="datastr" IsReadOnly="True" /> <ig:TextColumn Key="Id" Visibility="Collapsed" IsReadOnly="True" /> <ig:TextColumn Key="Level" Visibility="Collapsed" IsReadOnly="True" /> <ig:TextColumn Key="iLevel" Visibility="Collapsed" IsReadOnly="True" /> <ig:TextColumn Key="ApplicationSystem" Visibility="Collapsed" IsReadOnly="True" /> <ig:ColumnLayout Key="ChildItems" HeaderVisibility="Collapsed"> <ig:ColumnLayout.Columns> <ig:TextColumn Key="ID" Visibility="Collapsed" /> <ig:TextColumn Key="EqId" Visibility="Collapsed" /> <ig:TextColumn Key="ApplicationSystem" Visibility="Collapsed" /> <ig:TextColumn Key="ApplicationClass" Visibility="Collapsed" /> <ig:TextColumn Key="ApplicationType" /> <ig:TextColumn Key="ApplicationDescription" /> <ig:TextColumn Key="ApplicationComment" /> <ig:TextColumn Key="OEMProductLine" /> <ig:TextColumn Key="ProductTypeSingular" /> <ig:TextColumn Key="PartNumber" /> <ig:TextColumn Key="ProductAttribute" /> <ig:TextColumn Key="ProductComment" /> <ig:TextColumn Key="NumberRequired" /> <ig:TextColumn Key="Sequence" /> </ig:ColumnLayout.Columns> </ig:ColumnLayout> </ig:ColumnLayout.Columns> </ig:ColumnLayout> </ig:XamGrid.Columns> <ig:XamGrid.SelectionSettings> <ig:SelectionSettings RowSelection="Multiple" /> </ig:XamGrid.SelectionSettings> <ig:XamGrid.RowSelectorSettings> <ig:RowSelectorSettings Visibility="Visible" EnableRowNumbering="False" /> </ig:XamGrid.RowSelectorSettings> <ig:XamGrid.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/psLite;component/Assets/Styles.xaml"/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </ig:XamGrid.Resources> <ig:XamGrid.EditingSettings> <ig:EditingSettings AllowEditing="Cell" IsOnCellActiveEditingEnabled="True" IsEnterKeyEditingEnabled="True" /> </ig:XamGrid.EditingSettings> <ig:XamGrid.AddNewRowSettings> <ig:AddNewRowSettings AllowAddNewRow="None" /> </ig:XamGrid.AddNewRowSettings> </ig:XamGrid>
Thanks, I am able to work on this today more. So far it is working, I will let you know if I have further troubles.
I am just checking have you been able to resolve your issue? If you still need any assistance on the matter do not hesitate to ask.