i have an xamdatagrid where one of the column will be edited via xamcomboeditor. All the samples that i found uses staticresouce. but my requirement is differenet.
I need to do the following - The grid row has a person id column. and there is another column named relatives which uses xamcomboeditor. When the user clicks on the dropdown arrow button of a cell under relatives column , i need to get the corresponding person id and search a collection for matching values. the matching values have to ve poupulated in xamcomboeditor. I am using MVVM and so cannot write any even in the .xaml.cs file. please help.
Hi,
You can use behaviors to add functionality between the control and the viewmodel. In this link Devin is describing how to create behaviors to add additional functionality to a silverlight control but the same can be done with WPF controls.
http://blogs.infragistics.com/blogs/devin_rader/archive/2011/06/01/using-behaviors-to-synchronize-selected-items-of-infragistics-silverlight-controls-to-a-viewmodel.aspx
Let me know if you need any additional assistance.
Thanks for your reply Marianne. I took a look at the blog and see that it is possible, although it would be a very roundabout way to do what I want to do. Let me explain what I wish to do.
I have a CollectionView property called NewReportColumns in the ViewModel which my XamDataGrid binds to. The collection view is instantiated as follows
NewReportColumns = new CollectionView(ReportColumns);
ReportColumns is a List<NewReportColumn>
The NewReportColumn has a bunch of properties. Like Name, ID, Visible and DropdownList.
Now this DropdownList is a List<NewDropdown>. And NewDropdown has a Name and ID.
The XamDataGrid has AutoGenerateFields as false and I have <Field> tag declared for the columns I want to see. The XamDataGrid handles the Name, ID and Visible columns automatically. Name and ID appear as textboxes in the Grid and Visible appears as a checkbox. I want the DropdownList to appear as a XamComboEditor. If I go about it in the method described in the above post I would have to search the List<NewReportColumn> with the ID and populate the DropDown on items selected event of the grid, meaning only one dropdown is populated at an point of time (which btw I'm fine with). However I was wondering if there is a cleaner method to do this, meaning all the dropdowns are populated when the XamDataGrid is Loaded.
Also the method above seems to require installation of blend which I'm a bit reluctant to do. Also apologies Shouz59, I have no intention of hijacking your thread, its just that we seem to be in the same boat... :-)
That's part of the Micorsoft Expression Blend product which you can get from this site. I believe you can download a trial or full product version.
http://www.microsoft.com/expression/products/Blend_Overview.aspx
Please let me know if there is anything further I can help with regarding your original question.
I have another issue. I have a grid and in each row there are two columns that are of type radio button. Now for a particular row, if i click on one radio button column , the other radio button column 's selection should be removed and vice versa. Also, i need an event for the radio button toggle change.can u give me a sample code.
I am creating a private case for you concerning your last post.
In the future when you have a new question, unrelated to the current thread, it would be better to open a brand new forum thread. That way we can keep the forum threads focused on a specific topic so that people can find the answers to specific question more easily.
Hello,
I just tried your sample application and it is great! But then I enabled RecordFiltering in the DataGrid and when I tried to filter the "Children dropdownlist", I saw the "ChildId" and not the "Phone". How can this be achieved without changing the "ValuePath" property?
Thank you very much!
Chema
Sorting and Filtering in the XamDataGrid is based on the Value property of the Editor of the Field, so the solution would be to set the DisplayMemberPath and the ValuePath to the same Properties.
I have submitted a feature request, PI 12030034, on your behalf and based on your requirements to use the DisplayMemberPath for filtering instead of the ValuePath , so that those properties could be set to distinct values.
Your feature request has been directed to our Product Management team, which chooses new feature requests for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products so as trends appear in requested features, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback.
If you need any further assistance please do not hesitate to ask.