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

RadNumeric Textbox in RadGrid

1 Answer 217 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Atchut
Top achievements
Rank 1
Atchut asked on 30 Apr 2012, 08:29 PM
Hello,

I have a Numeric Textbox in Rad Grid. I have 2 columns in that Grid. Old Price and New Price.

Old Price is dataGridItem and Had a textbox in New Price Column.

My New Price should not be greater than Old Price.

How can I set this Rad Numeric textbox in the Grid. ?

TIA

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 02 May 2012, 05:23 AM
Hello Tia,

One suggestion is you can use a CompareValidator as shown below.
aspx:
<telerik:GridTemplateColumn>
 <ItemTemplate>
   <telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server"></telerik:RadNumericTextBox>
 </ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn>
  <ItemTemplate>
    <telerik:RadNumericTextBox ID="RadNumericTextBox2" runat="server"></telerik:RadNumericTextBox>
   <asp:CompareValidator ID="CompareValidator1" runat="server" Operator="LessThan" ErrorMessage="please enter a lower value" ControlToValidate="RadNumericTextBox2" ValueToCompare="RadNumericTextBox2" ControlToCompare="RadNumericTextBox1"></asp:CompareValidator>
 </ItemTemplate>
</telerik:GridTemplateColumn>

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