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

radnumeric textbox in template column

1 Answer 15 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alyssa
Top achievements
Rank 1
Alyssa asked on 28 Nov 2013, 12:50 PM
Hi
i have a radnumeric textbox in my grid in template column. I want to set its value to b right aligned and default value to be 0.0 how to get this?

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 28 Nov 2013, 01:09 PM
hi Alyssa,

You can set the CSS class to right align the Text in the RadNumericTextBox and to set the default value, add the property Value to it.Please try the following code snippet.

ASPX:
<telerik:GridTemplateColumn>
    <ItemTemplate>
        <telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server" CssClass="RightAligned"
            Value="0.0">
        </telerik:RadNumericTextBox>
    </ItemTemplate>  
</telerik:GridTemplateColumn>

CSS:
<style type="text/css">
  .RightAligned
  {
      text-align: right;
  }
</style>

Thanks,
Shinu
Tags
Grid
Asked by
Alyssa
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or