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

Compare ItemTemplate value to RadTextBox

1 Answer 89 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Christian
Top achievements
Rank 1
Christian asked on 22 Feb 2016, 08:55 AM

 

i have grid

<telerik:GridTemplateColumn DataField="Mark" DataType="System.Int16" FilterControlAltText="Filter Mark column" HeaderText="Mark" SortExpression="Mark" UniqueName="Mark">
                            <ItemTemplate>
                                <asp:TextBox ID="txtMark" runat="server" Text='<%# Bind("Mark") %>' Width="50px" AutoPostBack="True" Font-Names="Arial" Font-Size="Small"></asp:TextBox>
                            </ItemTemplate>
                            <HeaderStyle Font-Names="Arial" Font-Size="Small" />
                            <ItemStyle Font-Names="Arial" Font-Size="Small" />
                        </telerik:GridTemplateColumn>

 and  a Radtextbox outside the grid

i would like to compare the value from the ItemTeplate to the one in the RadTextbox and if the itemplate value is greater than the RadTextbox throw a msg.

Can anyone help?

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 25 Feb 2016, 10:02 AM
Hi Christian,

Generally, if you will use numeric values in these inputs, it is better that you use RadNumericTextBoxes. Then, you can use the client-side or server-side validation functions of the asp:CustomValidator to achieve this requirement:
https://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.customvalidator%28v=vs.110%29.aspx

I hope this will prove helpful.

Regards,
Eyup
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Christian
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or