3 Answers, 1 is accepted
0
Hello, Moj,
Right-to-left mode is used for certain languages such as Arabic, where people read and write starting from the right side of the page. So having the minus sign appear to the right in the RadGridView is natural.
However, you want to set the alignment of the text from left to right in GridViewDecimalColumn with negative numbers. In this case, you can subscribe to the CellFormatting event and set RightToLeft property to false. Please refer to the following code snippet which demonstrates how to achieve the illustrated result:
I hope this information helps. If you need any further assistance please don't hesitate to contact us.
Regards,
Nadya
Progress Telerik
Right-to-left mode is used for certain languages such as Arabic, where people read and write starting from the right side of the page. So having the minus sign appear to the right in the RadGridView is natural.
However, you want to set the alignment of the text from left to right in GridViewDecimalColumn with negative numbers. In this case, you can subscribe to the CellFormatting event and set RightToLeft property to false. Please refer to the following code snippet which demonstrates how to achieve the illustrated result:
private
void
RadGridView1_CellFormatting(
object
sender, CellFormattingEventArgs e)
{
if
(e.Column.Name ==
"NumberColumn"
)
{
e.CellElement.RightToLeft =
false
;
}
else
{
e.CellElement.ResetValue(RadElement.RightToLeftProperty);
}
}
I hope this information helps. If you need any further assistance please don't hesitate to contact us.
Regards,
Nadya
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
moj
Top achievements
Rank 1
answered on 22 Jun 2019, 04:47 PM
Hello
Very thanks for reply
This way is correct.
In Right-to-left languages such as Arabic position minus in left of number
Can solved problem without change RightToLeft column property ?
0
Hello Moj,
You can also use a custom numeric format string which allows to format numeric data in a custom way:
Additional information about custom numeric format strings is available in the following article: https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-numeric-format-strings
Let me know how this works for you.
Regards,
Nadya
Progress Telerik
You can also use a custom numeric format string which allows to format numeric data in a custom way:
decimalColumn.FormatString =
"{0:#,0;#,0-}"
;
Additional information about custom numeric format strings is available in the following article: https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-numeric-format-strings
Let me know how this works for you.
Regards,
Nadya
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.