Hi Telerik,
I've a trouble..
I set Maximum to 999999 and IsInteger = true which means value can't be more than 999,999 or 6 digits. But when I key in 999999 in my control it round-up and show 1,000,000 ( another i.e. key in 999994 , it round down to 999990 )
How to turn off automatic round function ?
this is my XAML
please give me some advice
Regard,
SweNz
I've a trouble..
I set Maximum to 999999 and IsInteger = true which means value can't be more than 999,999 or 6 digits. But when I key in 999999 in my control it round-up and show 1,000,000 ( another i.e. key in 999994 , it round down to 999990 )
How to turn off automatic round function ?
this is my XAML
<
telerik:GridViewDataColumn
ValidatesOnDataErrors
=
"None"
Width
=
"250"
DataMemberBinding
=
"{Binding MinAmt}"
Header
=
"Minimum Amount"
HeaderTextAlignment
=
"Center"
TextAlignment
=
"Right"
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding MinAmt, StringFormat='0,0'}"
TextAlignment
=
"Right"
x:Name
=
"MinAmtTextBlock"
Loaded
=
"MinAmtTextBlock_Loaded"
/>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
<
telerik:GridViewDataColumn.CellEditTemplate
>
<
DataTemplate
>
<
telerik:RadNumericUpDown
Maximum
=
"999999"
UpdateValueEvent
=
"PropertyChanged"
ShowButtons
=
"False"
PreviewKeyDown
=
"MinAmt_PreviewKeyDown"
Value
=
"{Binding Amount, Mode=TwoWay, UpdateSourceTrigger=Explicit}"
x:Name
=
"MinAmt"
Loaded
=
"MinAmt_Loaded"
/>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellEditTemplate
>
</
telerik:GridViewDataColumn
>
please give me some advice
Regard,
SweNz
7 Answers, 1 is accepted
0
SweNz
Top achievements
Rank 1
answered on 22 Aug 2011, 03:42 AM
Hi there ,
Still need help ..
My business logic is need to set MaxLength or Maximum Value of inputting value (or editing) in a gridview cell.
Thanks a lot,
SweNz
Still need help ..
My business logic is need to set MaxLength or Maximum Value of inputting value (or editing) in a gridview cell.
Thanks a lot,
SweNz
0
Hello Swenz,
Sorry, but I was unable to reproduce the described behavior. Would it be possible to send us your project, so that we can run it here locally and track down the source of the problem. In that way we will be able to provide you with solution in a timely manner.
Looking forward to your reply.
Regards,
Konstantina
the Telerik team
Sorry, but I was unable to reproduce the described behavior. Would it be possible to send us your project, so that we can run it here locally and track down the source of the problem. In that way we will be able to provide you with solution in a timely manner.
Looking forward to your reply.
Regards,
Konstantina
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
0
SweNz
Top achievements
Rank 1
answered on 26 Aug 2011, 10:39 AM
Hi Konstantina,
I can't send you a project because it's a company asset. Btw, Can you suggest me how to deal with following business logic in simplest way
- input field is always in RadGridView
- can set control maximum input length (like TextBox:MaxLength) from code behind.
- input data accepts only Numeric (digit)
- can validate input value after user fill in that control
- can use String Format for add comma ig. if user fill 87654321 after RowEditEnded in ViewMode must shows 87,654,321
looking for your response
Thank you,
SweNz
I can't send you a project because it's a company asset. Btw, Can you suggest me how to deal with following business logic in simplest way
- input field is always in RadGridView
- can set control maximum input length (like TextBox:MaxLength) from code behind.
- input data accepts only Numeric (digit)
- can validate input value after user fill in that control
- can use String Format for add comma ig. if user fill 87654321 after RowEditEnded in ViewMode must shows 87,654,321
looking for your response
Thank you,
SweNz
0
Sébastien
Top achievements
Rank 1
answered on 12 Sep 2011, 07:04 PM
I have a similar problem, and you can reproduce it with your own Q2 2011 samples.
In the NumericUpDown examples, go to the Theming demo, then use the top numeric control, with label NUMERIC FORMAT.
We're trying to use the control to enter credit card numbers. If you try something like 6666666666666012, the control will display
6,666,666,666,666,010, where the last digit is always rounded. If I had entered .....6015, I would have ended up with ......6020.
What's happening here ? The control is bound to a UInt64. Does the control badly support 64-bit numerals ?
Thanks,
Sebastien
In the NumericUpDown examples, go to the Theming demo, then use the top numeric control, with label NUMERIC FORMAT.
We're trying to use the control to enter credit card numbers. If you try something like 6666666666666012, the control will display
6,666,666,666,666,010, where the last digit is always rounded. If I had entered .....6015, I would have ended up with ......6020.
What's happening here ? The control is bound to a UInt64. Does the control badly support 64-bit numerals ?
Thanks,
Sebastien
0
Hello Sébastien,
If you are about to enter creadit card numbers I would ask you to consider using RadMaskedInput.
Regards,
Pana
the Telerik team
If you are about to enter creadit card numbers I would ask you to consider using RadMaskedInput.
Regards,
Pana
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Sébastien
Top achievements
Rank 1
answered on 16 Sep 2011, 01:13 PM
It's not ALWAYS a credit card. We have to support multiple card formats, but it has to be a Numeric control.
Please tell me how to disable the rounding on the Numeric control.
Sébastien
Please tell me how to disable the rounding on the Numeric control.
Sébastien
0
Hi,
The
I would suggest you if you are using the field for different cards to use a different approach. For example the user may chose the card type and a different input control would appear for the different types making it using a MaskedInput with different masks for different card types and if a shorter double or int value is required - use numeric.
I am sorry for the inconvenience.
Kind regards,
Pana
the Telerik team
The
Debug
.WriteLine(((double)(6666666666666012)).ToString("F"));
Outputs a 66666666666666010 and the RadNumericUpDown uses a double inside. I believe we are not going to change that.
I would suggest you if you are using the field for different cards to use a different approach. For example the user may chose the card type and a different input control would appear for the different types making it using a MaskedInput with different masks for different card types and if a shorter double or int value is required - use numeric.
I am sorry for the inconvenience.
Kind regards,
Pana
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>