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 Andrew,
Thanks for help. It is working as expected now.
Thanks a ton!!
Hello Priya,
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;
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewDeveloper Support IInfragistics Inc.www.infragistics.com/support
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;
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.
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