Hello,
I've some troubles/questions with my xamDataGrid:
1. If a user add a Row, I will change the Value of one Field. How can I identificate the right cell/field, when the DataSource is binded to a System.ComponentModel.BindingList?
2. The cells of my xamDataGrid where generated automatically (because I've bind it to the BindingList...). Can I identify all auto-generated Cells/Fields to change some things at this fields? I don't know how!
3. One auto-generated Field is bind to an enum. If I change the value of the cell to an invalid value, I get the error message, that the value is not valid, but I don't see the valid values. Is it possible to modify the error message, that I see the list of valid values?
Greets and many, many thanks...Marco
Marco,
Regarding your first question "Is it possible to set this automatically for all enum fields or had I to define for each field/enum a ObjectDataProvider section?" - I don't think there is any way to reuse this dataprovider on all of the fields so that each combo is bound to appropriate enum type. So you will have to create multiple dataproviders and styles. However, if the enum types are the same on couple of Fields then you can create only one style for the XamComboEditor and set it on the fields using EditorStyle property.
About the second requirement "to have combobox in each row with different values" - it is possible by getting the CellValuePresenter and change the editor style but is not recommended because it can cause some issues with the virtualization.
You may request this as a new feature request here so that we can add it in the next releases.
I've another problem. My goal is it to have a ComboBox in each row with different values (i.e. first Row has: One, Two, Three; second Row has: Four, Five, Six in its ComboBox). This values had to be set in CodeBehind at runtime.
Thanks...
Marco
Vlad...GREAT!!! That's, what I'm searching for!! THANK YOU!!!!! ;o))
Is it possible to set this automatically for all enum fields or had I to define for each field/enum a ObjectDataProvider section?
Please find the attached sample and let me know if you have any questions.
Hello Vlad,
this is rigth, but how do I change the editor of an (autogenerated) bounded field? I did'nt have any Field-section in xaml!
I've build a test-project (Test.zip, see above). In this project I will have a combobox in the field "State" with the values "Half", "Full" and "Empty". Can you show me how I can do this?
Another question: is it possible to change the sign ($) of the currency-editor? In germany we have EUR (€) as currencysign. Can you show me this too?
Many, many thanks...