Hi All
I have a scenario where I have an expandable data grid.
For eg:
+A1
+A2
On expanding we see,
A1
B1
B2
B3
Now my question/discussion is the best possible approach to select the parent or child records. Now i have to maintain each of the records separately for which I need the selected items. Need some guidance for the best possible approach in selecting the items. There can be single select of parent or multiselect of parent. Also different children from different parent can be selected.
My project is in MVVM using WPF. I am using less of codebehind. Helpful if the solution is in xaml selected items or some generic method in the code for MVVM.
The guidance will be very helpful.
Thanks
Hello,
It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking through your post and I can say that you are able to select Records only from one FieldLayout. Also, here you can read how to iterate trough all Records
http://help.infragistics.com/NetAdvantage/WPF/2011.1/CLR4.0/?page=xamDataPresenter_Iterate_through_the_Records_Collection.html
which you can use to select the ones you want.
Feel free to write me if you have further questions.
I was able to get this hierarchical data to display correctly but I'm having a problem selecting rows within my XamDataGrid when there is a hierarchy of records displayed. I set the 'SelectionTypeRecord' property in my FieldLayoutSettings to "Extended" and I'm able to multi-select child records in any of my top-level records. But once I select multiple records under one parent node, I can’t select any other child records in the other nodes. What am I missing here? Anyone have any ideas?
I have also tried to set the SelectionTypeRecord property of the child Layout in the FieldLayoutInitialized method of XamDataGrid like below but of no use.XamDataGrid1.FieldLayouts[1].Settings.SelectionTypeRecord = Infragistics.Windows.Controls.SelectionType.Extended;XamDataGrid1.FieldLayouts[1].Settings.SelectionTypeField = Infragistics.Windows.Controls.SelectionType.Extended;XamDataGrid1.Records.FieldLayout.Settings.SelectionTypeRecord = Infragistics.Windows.Controls.SelectionType.Extended;
Hi Stefan,
I was wondering if we could select parent and child records if they were defined as part of the same FieldLayout.
In my case I have only one field layout and its settings are as shown below,
<dataPresenter:FieldLayoutSettings ExpansionIndicatorDisplayMode="CheckOnDisplay" AllowClipboardOperations="All" AutoGenerateFields="False" AllowAddNew="False" RecordFilterScope="AllRecords" AllowDelete="False" AllowFieldMoving="WithinLogicalRow" AllowRecordFixing="Default" RecordSelectorLocation="Default" SupportDataErrorInfo="RecordsAndCells" HeaderPrefixAreaDisplayMode="FieldChooserButton" SelectionTypeCell="Extended" SelectionTypeField="Default" SelectionTypeRecord="Extended" />
The way I define my hierarchical data is by simply adding a new "Field" and pointing it to my Children collection,
<dataPresenter:Field Name="Children" />
Even in this case, the XamDataGrid does not allow me to select two records from different levels of nesting i.e., a record at nesting level 1 and a record at nesting level 2.
I am currently on Infragistics 14.1.
Please let me know if I am missing any setting or of a way to achieve this. Thanks.
As it was stated in some of the earlier posts, the user is not allowed to select Records from different layouts.
I'm actually trying to figure out how to do the same thing. We wanting to select multiple rows that include selection of both the parent and child records at the same time. Anyone have an idea how this is done please let me know.