I tried XamComboEditorStyle, but it binds combobox to entire field. Whereas I want to bind Combobox only to currently selected cell.
Please help.
Thanks.
Priya
Hello Priya,
I am somewhat unsure of what you are asking here to be honest. Do you mean that you want the XamComboEditor to be in the cell that you click? Or do you want the value that is in the cell to show up in the xamComboEditor?
Sincerely,AndrewDeveloper Support IInfragistics Inc.www.infragistics.com/support
Hello Andrew,
Thanks for reply.
I want XamComboEditor to be applied to the Cell which I clickeda and not the column.
Whenever I click on another cell, this cell should look as Text field and that other cell should have Combobox.
Currently, It gets applied to entire field i.e. all the cells in clicked cell's column.
Thanks,
How do I add SelectedItemsChanged event to Event Handler when I create XamComboBox like:
var XCE = new FrameworkElementFactory(typeof(XamComboEditor));
XCE.SetBinding(XamComboEditor.ItemsSourceProperty, new Binding() { Source = micrSymbols}); XCE.SetBinding(XamComboEditor.DisplayMemberPathProperty, new Binding("Value"));
Sorry to have so many questions as I am new to this technology.
Thanks in advance!
-Priya
Here is an article about binding event handlers to FrameworkElementFactory elements : http://social.msdn.microsoft.com/Forums/vstudio/en-US/a79b62ce-ce36-4234-93d9-f2ed570176ff/frameworkelementfactory-addhandler.
However, I have found a better way to stop the reversion than handling the SelectedItemChanged event. Instead, I made a binding to the XamComboEditor.SelectedItemProperty. In the binding, it binds to the property name, and then the source is set to ((DataType)CellValuePresenter1.Record.DataItem).
I have attached a sample application demonstrating this.
Please let me know if you have any other questions or concerns on this matter.
How do I set Binding for 'C' if I am using List of chars?
It is not recognizing anything if mention ListName in Binding like:
Binding C = new Binding("micrSymbols"); C.Source = CVP.Record.DataItem;
In the constructor for the binding, you want the property name that you are binding to rather than the list’s name.
In the sample I had sent you, the binding was new Binding(“FoodType”){ } . In my data source, FoodType was a property in it, not the name of the collection.
If your data source itself is a List of chars, then the Binding will look like the following:
Binding B = new Binding(“Value”);B.RelativeSource = RelativeSource.TemplatedParent;
Thanks for help. It is working as expected now.
Thanks a ton!!