I am using a behavior for SelectedItems as directed by Infragistics. However, when the user Groups By a field in the XamDataGrid, SelectedItems always remains an empty collection, so none of my actions do anything. How can i resolve this? I saw SelectedItems was supposed to be done for 14.1 "Due in April". But it looks there there was only a service release instead, does that include SelectedItems binding? Attached is the behavior I am currently using to allow SelectedItems binding.
Hello Travis,
I have been looking into your issue. Currently the SelectedDataItems property is an Object Array. If you would like you can create a new Product Idea for the SelectedDataItems property to support ObservableCollection on our site:http://ideas.infragistics.com.
Steps to create your idea:
The benefits of submitting the product idea yourself include:
- Direct communication with our product management team regarding your product idea.
- Notifications whenever new information regarding your idea becomes available.
Additional benefits of the Product Idea system include:
- Ability to vote on your favorite product ideas to let us know which ones are the most important to you. You will have ten votes for this and can change which ideas you are voting for at any time.
- Allow you to shape the future of our products by requesting new controls and products altogether.
- You and other developers can discuss existing product ideas with members of our Product Management team.
The product ideas site allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.
Thank you for contacting Infragistics.
so is this the only way to have "John" and "Brenda" in SelectedDataItems:
SelectedPeople=new Object[]{People[0], People[1]};
or is there a simpler way. This seems so much more convoluted than if SelectedDataItems was an ObservableCollection.
Ok thanks! How would i set selected items in code? For example, if the sample you sent, how can i have "John" and "Brenda" selected when the grid loads?
I have been looking into your issue. The SelectedDataItems property is of type Object Array. More about the property you can find on the following link from our documentation: http://help.infragistics.com/Help/Doc/WPF/2014.1/CLR4.0/html/InfragisticsWPF4.DataPresenter.v14.1~Infragistics.Windows.DataPresenter.DataPresenterBase~SelectedDataItems.html.
I have modified the sample application you have provided in your previous post for you. I have added a ListBox, bound to the selected items, so they can be seen right after they were selected. I have also set the SelectionTypeRecord property to extended.
Please find the attached sample application and feel free to let me know if you have any further questions on this matter.
The fix for 13.2 with the added behavior seems to work.
However, I upgraded to 14.1 in order to eliminate this added behavior. This SelectedDataItems property doesn't seem to work at all. I included modified the sample for 14.1 with SelectedDataItems="{Binding SelectedPeople}" and SelectedDataItemsScope="RecordsOnly". The show button always says there are two selected people, no matter what selection the user does in the grid. User interaction seems to do nothing. The sample browser and documentation is of no help. How does this new property work and how am i supposed to bind it to my view model?