This is a migrated thread and some comments may be shown as answers.

RadNumericUpDown control NumberGroupSeparator doesnt work inside radgridview template

1 Answer 128 Views
NumericUpDown
This is a migrated thread and some comments may be shown as answers.
Kiran
Top achievements
Rank 1
Kiran asked on 09 Dec 2014, 05:21 PM
Hi experts,

I might have a isolated issue here. Not sure if I'm missing anything :) I have a RadGRidView and im using NumericUpdown control for data entry. The NumericUpdown control NumberGroupSeparator is not working. It doesnt show the 'comma'. If the take the same control out of the the grid, it works fine. I have attached my code here. I know by default the group separator should work, but as it was not working I also tried adding that extra numberFormatInfo xml code, but with no luck. The data member that  I'm binding is a double(should be an int)
Please let me If I'm missing anything.

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Boris
Telerik team
answered on 11 Dec 2014, 05:06 PM
Hi Kiran,

In general the group separator will not be shown during the edit of the NumericUpDown control, it will show itself after the control is not focused.

In your case the NumericUpDown is placed as a CellEditTemplate for the GridViewDataColumn, which means that the group separator will not be shown at all after you commit the changes. That is so because then the default CellTemplate is displayed.

A possible way to show the group separator, after the edit has finished and you are viewing the default CellTemplate (a bound TextBlock), is to set the DataFormatString property of the column to "{}{0:N0}" or "{}{0:0,0}" like so: 

<telerik:GridViewDataColumn DataMemberBinding="{Binding StadiumCapacity}" DataFormatString="{}{0:N0}">
    <telerik:GridViewDataColumn.CellEditTemplate>
        ...            
    </telerik:GridViewDataColumn.CellEditTemplate>
</telerik:GridViewDataColumn>

For more information about how to set up the DataFormatString property, you can check the Data Formatting documentation article.

On a side note if you need to display the group separator during edit I would recommend that you check the GridViewMaskedInputColumn column and RadMaskedInput control.

I hope this helps.


Regards,
Boris
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
NumericUpDown
Asked by
Kiran
Top achievements
Rank 1
Answers by
Boris
Telerik team
Share this question
or