Hi,
I have a XAMComboEditor in my XAMDatagrid field. I display a list of options in the combo by setting values to the Itemsprovider in the style of that field.
When I select an item in the combo box, instead of displaying the selected value, I want some customized value to be displayed in the combo box(some dynamically calculated value based on the selection).
And this customized value should be set in the corresponding property of my observable collection that I have bound to the grid.
Another question is, is it possible to bind a method to a control?
Thanks.
Hello,
I am just checking if you require any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
I have been reading through your reply and the reason for the XamComboEditor to not update its value after you set property of the DataItem might be that your DataItem object does not implement INotifyPropertyChanged. I have modified the sample application that I have attached earlier in our discussion in order to implement INotifyPropertyChanged for the DataItem class and also handled the ValueChanged event of the XamComboEditor. If a value of the Combo1 Field is changed the value of the Combo2 of the same Record is updated.
If you need any further assistance please do not hesitate to ask.
Krasimir, thanks. It works.
But I am still facing a problem for which i would require your assistance.
Based on the value selected in the cell with combo box in one record, I have to update the same column in other records.(These cells also have a combobox). To do this I update the dataItem associated with that record. The dataItem gets updated, but the grid doesnt refresh and display the new values. How do I handle this?
I have created a sample application for you that demonstrates how the functionality that you are looking for can be achieved. I have re-tempalted the CellValuePresenter in order to have a XamComboEditor in it and I have bound the value of the corresponding cell to the Text property. I have also set a converter that can be used to display the custom strings that will corresponds to the selected items in the editor.