Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2290
XamComboEditor when IsEditable = false
posted

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

XamComboEditor.rar
Parents
No Data
Reply
  • 34430
    Offline posted

    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,
    Andrew
    Developer Support I
    Infragistics Inc.
    www.infragistics.com/support

Children