Hello,
I'm using the xamNumericEditor to display various numbers in a xamDataGrid.
For some of these fields I'm changing the properties IsEnabled and IsReadOnly according to user permissions.
Would it be possible to display a non-numeric value when the editor is disabled, to indicate, that the field isn't writeable?
For example I would like to display "-" in the editor. Maybe using a ValueConverter?
Hello Christian,
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
Hello Stefan,
I haven't got this working yet. The post you referred me to, doesn't resemble my problem very well.
What I'm trying to achieve is as follows.
A xamNumericEditor that is disabled/ReadOnly and has a text that indicates, that the editor inaccessible.
I know that I can disable the editor, so the user can't select it. This however, isn't very intuitive, in my opinion.
Could you provide me with an example of this?
I am just checking if you require any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Thank you for your reply. I am very glad that the approach I have suggested was helpful for you. I have looking into the question that you are having and If I understand correctly, you wish to have a Boolean property that will determine whether the converter should be used. If this is correct, I can suggest using a StyleSelector for the EditorStyleSelector property of the FieldLayoutSettings for the field. I have modified the sample application that I have attached with my previous reply in order to demonstrates this approach.
Please let me know if you need any further assistance on the matter.
Thanks. That works just fine!
Would it be possible to add a boolean property to the Data-class and use this, to determine which value, the converter should return?
This would be very useful in my case.
Thank you for your reply. I have been reading through it and if I understand correctly, you wish to indicate that the cells in a given fields are read only, with additional text in the XamNumericEditor and also to make the cells read only and keep the ability to select them. If this is correct, I can suggest using converter for the ValueToDisplayTextConverter property of the XamNumericEditor, which can be used to convert the editor’s value to text that is different by the default text. For disabling the editing of the cells and keep the selection functionality, I can suggest setting the AllowEdit property of the FieldSettings of the Field, which will allow selecting the cells of the field and will disable the editing. I have created a sample application for you that shows how you can implement this approach.
Please let me know if this is what you are looking or I have misunderstood you in any way.