Hi Team,
We are using MVVM and used XamComboEditor for records displaying, I was used DataTemplate of ComboBox for multiColumn its working fine, when i was selecting any item from ComboBox Name property is proper displayed in Textbox, but when i used IsEditable = false then whole object is displayed in Textbox including Delete and CheckBox columns instead of Name, when i press Ok button than Name is displayed instead of whole object its mean when focus is in Textbox then whole object displayed when focus is out than only Name property displayed, i want IsEditable = false for restricted user typing in Textbox. How can i achieve this goal? Is there any other property that was used for read only Textbox ? If yes please guide me its urgent. Sample project is attached.
Thanks,
sufyan
Hello Sufyan,
I ran your sample project and it seems that regardless of whether you have a DisplayMemberPath defined, the XamComboEditor will rely on its ItemTemplate as long as it has focus. To work around this, you could handle the SelectedItemsChanged event of the XamComboEditor and in the handler, set focus to something else on the page.
Regarding the Read Only TextBlock, you have isEditable defined multiple times in your sample application. Once in MainWindow.xaml and again in your Theme XamComboEditor.xaml. If these two conflict, it could be what is causing your issue.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewDeveloper Support IInfragistics Inc.www.infragistics.com/support
Hi Andrew,
I was handled the SelectedItemsChanged event of the XamComboEditor and in the handler i was set focus on button, even i was removed isEditable from theme but still not working, can you modified my sample as i wish, changed sample project is very helpful for me.
Sufyan
I have attached a modified version of the sample you sent me that sets the isEditable property to False and handles the SelectedItemsChanged event of the XamComboEditor.
Please let me know if you have any other questions or concerns or if this sample project does not show the Name property on Item Changed or if the XamComboEditor is editable.
Still i face problem, when i was selected any item from drop-down name is displayed in the text-box area, but when i was expand it on clicking search button than whole object is displayed in the text-box, problem not fixed properly. This problem is occurred when we use IsEditable property false, for verification please remove this property and then see behavior. If IsEditable property creates problem than please suggest me any other property its very urgent for us to make read only text-box so users not write any text just select from drop-down items. Snapshot is attached.
When you click on the search button of the XamComboEditor, the editor regains focus and opens the drop-down. Since it regains focus, it reverts back to its ItemTemplate and displays the entire item in the view box at the top.
I am curious if you know of our XamMultiColumnComboEditor control, where you could achieve the functionality in your sample without having to re-template the combo box. You can read about the XamMultiColumnComboEditor here: http://help.infragistics.com/doc/WPF/2014.1/CLR4.0/?page=xamMultiColumnComboEditor.html
If you see my project I was used Button to delete records, but in XamMultiColumnComboEditor we have not an option to add any button so that's why i was used XamComboEditor with data template, Please fix my problem as soon as possible because we are so late. Its not a big deal to make read only text box, please discuss with other members definitely they must have a solution of this simple task.
To make the textbox at the top of the XamComboEditor read-only, you can set the IsEditable property of the XamComboEditor to False.
Regarding the ItemTemplate, it is expected behavior that when a XamComboEditor drop down opens, the data in the drop-down as well as the data shown at the top will reflect the editor’s ItemTemplate.
With regards to the XamMultiColumnComboEditor, you will need a property in your underlying data source for each column you plan to put into it. If you have an empty property for the Button and Checkbox, you can generate a column for them and Style the cells to have a button or checkbox in them.
I have attached a sample that demonstrates the XamMultiColumnComboEditor working much like the way the XamComboEditor is working in your sample.
Just checking in, did you have any other questions or concerns on this matter?
Sincerely,Andrew,Developer Support IInfragistics Inc.www.infragistics.com/support