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

Radgrid Column Format in Add and Edit Mode

1 Answer 80 Views
Grid
This is a migrated thread and some comments may be shown as answers.
License Developer
Top achievements
Rank 1
License Developer asked on 18 Dec 2008, 06:01 AM
Hi,

I have a radgrid(ASP.NET AJAX Q1 2008) on that i have a Bounded column " QUANTITY". I want to show this column having format of rounding off to two decimal places. The main issue iam facing is that when in add Mode I enter 9 in QuanityColumn, It should get changed to 9.00 on tabbing out of that column. Kindly let me know how to procedd to achive the above end result. The same applies for Quantity column in Edit Mode. Screenshot is attached. Please help.

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 18 Dec 2008, 09:55 AM
Hello,

A possible approach would be to use a TemplateColumn as shown below:
<telerik:GridTemplateColumn UniqueName="Number"
    <ItemTemplate> 
        <asp:Label ID="Label1" runat="server" Text='<%# Bind("Number") %>' /> 
    </ItemTemplate> 
    <EditItemTemplate> 
        <telerik:RadNumericTextBox ID="RadNumericTextBox" runat="server" Value='<%# Bind("Number") %>' 
            NumberFormat-DecimalDigits="2" /> 
    </EditItemTemplate> 
</telerik:GridTemplateColumn> 

Let us know if you need more information.

Best regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
License Developer
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or