Hi,
I want to apply the style of xamnumeric editor in one of the column in xamdatagrid.
I can apply the style xamnumericeditor in cellvalue presenter and i can apply that style to the column.
but i dont want user to edit the content in xamnumericeditor..user has to edit the content using spinup or spindown(Up & Down)
Which property need to enable to achieve this??
and also i want to apply the valueconstraint to xamnumeric editor ...if i am applying style for xamnumericeditor,,how to achieve this also..
Please help me..
Could you please anyone can look into the issue?
Thanks..
Chandra
Hello Chandra,
I have been looking into your question and I was wondering whether you have tried to use the ‘IsReadOnly’ property of the XamNumericEditor :
http://help.infragistics.com/NetAdvantage/WPF/2012.2/CLR4.0/?page=InfragisticsWPF4.Editors.v12.2~Infragistics.Windows.Editors.ValueEditor~IsReadOnly.html
Using it you will be able to change the value of the editor using its ‘Value’ property via code.
Let me know, if you need any further assistance on this matter.
Hi Yanko,
Thanks for your reply..
>>
<ig:XamNumericEditor Name="xamNum" InvalidValueBehavior="RevertValue" SpinButtonDisplayMode="Always" Mask="{}{double:4.1}" Theme="IGTheme" PreviewKeyDown="xamNum_PreviewKeyDown_1" PreviewMouseWheel="xamNum_PreviewMouseWheel_1" IsAlwaysInEditMode="True" PromptChar="" Text="NA"> <ig:XamNumericEditor.ValueConstraint> <ig:ValueConstraint MinInclusive="300" MaxInclusive="500"></ig:ValueConstraint> </ig:XamNumericEditor.ValueConstraint> </ig:XamNumericEditor>
<<
I already tried with property IsReadonly = True, but if i set this option numeric up & down buttons are disabled.
But i need to have spin buttons to update the values.
How can i achieve it?
I have been looking into your post. What I can suggest is to re-template the default style for the xamNumericEditor. There in the EditTemplate to handle the PreviewMouseDown event and handle it. I have created a small sample for you to be able to see this functionality.
Please find the attached sample application and feel free to let me know if you have any further questions on the matter.
Thanks for your email...
<Style TargetType="{x:Type igEditors:XamNumericEditor}" BasedOn="{StaticResource XamMaskedEditorBaseStyle}"> <Setter Property="InvalidValueBehavior" Value="RevertValue"/> <Setter Property="SpinButtonDisplayMode" Value="Always"/> <Setter Property="InsertMode" Value="False"/> </Style>
How can i set the Maximum constraint and minimum constraint for xamnumericeditor?
Thank you for the feedback. Please do not hesitate to contact us if you have any questions.
Thank you..it worked..
Currently...i dont have any problems..if anything is there..then i will get back to you..
I have been looking into your issue and have modified the sample you have attached. In the modified sample I removed the Style for the CellValuePresenter and included the ValueConstraint settings in the Style for the xamNumericEditor. Making this changes the numbers that are displayed do not have the underscores in front of them.
Please refer to the attached sample application and feel free to let me know if you have any further questions on the matter.
Adding image
Hi Gregana,
Thanks for your help..
As per your suggestions, I modified sample and attached the same for your reference.
I am looking for the Nuemeric up/Down ...functionality
I have attached image for your reference, when i keep cursor in editor, it shows underline...How can i avoid that..
And I dont want to display decimal values..
How to achieve the both functionalities?
Can you help me?