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

Validate textbox in template

1 Answer 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Felice
Top achievements
Rank 1
Felice asked on 28 Mar 2014, 12:50 PM
I have several textBoxes in a template edit form that I need to validate. The value could be null (no input) otherwise a number with max value 100. Moreover, I need to show/format the number with % but, being the db column an int, I do not have to write the % but only show it in the text box. How can I do the above?
Thanks,
Felice
<EditFormSettings EditFormType="Template">
  <EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn1 column">  </EditColumn>
     <FormTemplate>
          <table>
            <tr>
             <td> </td>
             <td>
              <asp:Label ID="Label1" runat="server" Text="Margins:"></asp:Label>
              </td>
              <td>
               <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind( "margins" ) %>'></asp:TextBox>

1 Answer, 1 is accepted

Sort by
0
Felice
Top achievements
Rank 1
answered on 28 Mar 2014, 04:38 PM
Problem solved using a radnumeric textbox.
Tags
Grid
Asked by
Felice
Top achievements
Rank 1
Answers by
Felice
Top achievements
Rank 1
Share this question
or