Hello,
I would like to create a datagrid that provides a list of States as a XamComboEditor and another that provides a list of Cities within a State as a XamComboEditor. I am not sure how to accomplish this. Basically I would like the selected item of the States to filter the ItemsSource of my Cities combobox. Any thoughts?
You have to re-template the CellValuePresenter (where you want to have the two Combos -- Template property). It is easy by creating a style. You can find default styles of all the controls and parts in the DefaultStyles directory in the Infragistics folder on your computer.
Alex.
I admit, my example was not very well.I thought i could code something quick instead of a usefull practical sample.
I have a calculated result displayed in a datagrid. This result consist of links, and each link must have two frequencies (Tx/Rx). But first all these frequencies are calculated individually, so every link must have two comboboxe's which contain multiple calculated frequencies. And the user must select one Tx frequency and one Rx frequency from the list, for each link.
When can i "plugin" on the cell level to set the Cell.EditorStyle/EditoryType correctly?
A cell does not expose a FieldSettings property, so I assume you are using the Cell.Field.FieldSettings. Since the FieldSettings property belongs to the Field object, all cells in that field will use the same combo box. Instead, you should be setting the Cell.EditorStyle and/or Cell.EditorType properties to use a different xamComboEditor in each cell.
The only problem I see here is a clash between the collection properties exposed by your data source and the functionality of the xamComboEditor. The xamComboEditor control allows your end users to select a single value; where-as the tenMileRuns property and gameNames property are nested collections within your Person entity. There is no way to convert between a single value selected by your end user and the corresponding collection property. For example, if you have a xamComboEditor that displays all the date times of a ten mile run, and your end user selects a single date, what's supposed to happen?
If the xamComboEditor is simply for read-only purposes, you can define the field layout yourself and leave out the fields that correspond to the collection properties. Then, you can add unbound fields to display the xamComboEditor with the values of the nested collections.
Sorry but maybe is my example not clear....because you refering to a basic combobox in which the values in every row are the same.
Straightforward: I need a Column with a combobox with different values.
I'm trying to set the fieldsettings of a cell, but then gets that column in each row the same combobox-values
(If i can't bind it, i hardcode it, no problem).
Any idea's?
The XamDataGrid will not be able to insert the values directly in the ComboBoxes. This will be a form of hierarchy. You need to set the datasource of the ComboBoxes the collections of data - in your case : gameNames and tenMileRuns. You can see that i the XamFeatureBrowser -> Control Composition -> XamComboBoxEditor in DataRecord Cells.