Hi,
Is it possible to have a combobox column within a XamDatagrid that would also allow the user to add new values?
It looks like the CustomValueEnteredAction property is available on just standalone XamcomboEditors and not on those which are used as field editors within the grid.
Thanks.
Hello Ribao80,
Thank you for your post.
I have been looking into your question and if I understand correctly you are talking about our cross platform XamComboEditor. We have two XamComboEditors. One is WPF specific and the other is cross platform editor. You can read more details about the differences between these XamComboEditors from the following forum thread:
http://www.infragistics.com/community/forums/t/68563.aspx
Here you can find details about how you can get a shared XamComboEditor working inside a XamDataGrid cells. Basically you need to re-template the default style of CellValuePresenter for the Field where the XamComboEditor will be located and change the template in order to include the XamComboEditor you want.
http://www.infragistics.com/community/forums/t/104717.aspx
Please let me know if you require any further assistance regarding this matter.
Thank you for using Infragistics Components!
Thanks for your reply.
I'm following the sample code from this post: http://www.infragistics.com/community/forums/t/104717.aspx
I've come across a problem: my combobox items source is just a list of strings. When I open up the dropdown it shows the length of each string instead of the actual string value.
Any ideas? Below is the code I've attached to the CellValuePresenter's Laoded event handler.
var cvp = sender_ as CellValuePresenter; if (cvp == null) { return; } DataTemplate dt = new DataTemplate(); FrameworkElementFactory spFactory = new FrameworkElementFactory(typeof (XamComboEditor)) {Name = "myComboFactory"}; spFactory.SetValue(DataContextProperty, cvp.DataContext); spFactory.SetValue(XamComboEditor.ItemsSourceProperty, new Binding("DataPresenter.DataContext.AvailableBrokerNames")); spFactory.SetValue(XamComboEditor.IsEditableProperty, new Binding("DataItem.IsNew")); spFactory.SetValue(IsEnabledProperty, new Binding("DataItem.IsNew"){Converter = new InvertedBooleanConverter() }); spFactory.SetValue(XamComboEditor.SelectedItemProperty, new Binding("DataItem.BrokerName")); spFactory.SetValue(XamComboEditor.CustomValueEnteredActionProperty, CustomValueEnteredActions.Allow); dt.VisualTree = spFactory; cvp.ContentTemplate = dt;
BTW is there a IsReadOnly property or equivalent for this XamComboEditor? There is for the one deriving from ValueEditor.
Regards.
Hello,
I have been looking into the behavior you reported. I created simple project based on your scenario in order to be able to test this issue and I could not managed to reproduce the behavior that you have described. If you are not able to reproduce the issue with the attached sample application, would you please modify it with the functionality, that you are using, so it reproduces the issue. This way I would be able to further investigate this for you and provide you with more detailed information on this matter.
Regarding your second question currently our cross platform XamComboEditor does not provide IsReadOnly property. What I can suggest is to use it’s IsEnabled property. If you would like such property(IsReadOnly) to be implemented in future versions of our shared XamComboEditor I can suggest you to submit new ProductIdea. You can suggest new Product Ideas for future versions (or vote for existing ones) at http://ideas.infragistics.com.
Steps to create your idea:
Log into the Infragistics Product Ideas site at http://ideas.infragistics.com (creating a new login if needed).
Navigate to the product / platform channel of your choice (e.g. WPF, Windows Forms, ASP.NET, HTML5 / Ignite UI, iOS / NucliOS, etc.)
Add your product idea and be sure to be specific and provide as much detail as possible.
Explain the context in which a feature would be used, why it is needed, why it can’t be accomplished today, and who would benefit from it. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it. Be convincing!
Include a link to this thread in your idea so product management will be able to look back at this case.
The benefits of submitting the product idea yourself include:
Direct communication with our product management team regarding your product idea.
Notifications whenever new information regarding your idea becomes available.
Additional benefits of the Product Idea system include:
Ability to vote on your favorite product ideas to let us know which ones are the most important to you. You will have ten votes for this and can change which ideas you are voting for at any time.
Allow you to shape the future of our products by requesting new controls and products altogether.
You and other developers can discuss existing product ideas with members of our Product Management team.
The product ideas site allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.
Thank you for contacting Infragistics.