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

How To Use RadNumericColumn To Get Only Intiger Number

1 Answer 147 Views
Grid
This is a migrated thread and some comments may be shown as answers.
farnaz
Top achievements
Rank 1
farnaz asked on 03 Sep 2011, 10:57 AM
Here is My radNumericcolumn , it must get only intiger numbers .. but doesn't work.

<telerik:GridnumericColumn  DataField="ProductionYear" ColumnEditorID="NumericEditor1"          UniqueName="ProductionYear" HeaderText="سال تولید"  NumericType="Number" MaxLength="4" 
 DataType="System.Int32"
  </telerik:GridnumericColumn>
  
  
  
  <telerik:GridNumericColumnEditor ID="NumericEditor1" runat="server" >        
      <NumericTextBox ID="NumericTextBox1" DataType="System.Int32" runat="Server">
             <NumberFormat AllowRounding="true" DecimalDigits="0"  GroupSeparator=""/>      
      </NumericTextBox>  
  </telerik:GridNumericColumnEditor>

please help me if anyone has idea
thanks

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 05 Sep 2011, 05:24 AM
Hello Farnaz,

Try setting the DataFormatString of GridNumericColumn as shown below in order to show integer values only.
aspx:
<telerik:GridNumericColumn DataField="Price" DataFormatString="{0:N0}" UniqueName="Price"
</telerik:GridNumericColumn>

Thanks,
Princy.
Tags
Grid
Asked by
farnaz
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or