hadoop hadoop

hadoop hadoop

  • NA
  • 159
  • 50.8k

grid data comparison and computing total

May 26 2018 2:18 AM
How shall I compare two columns data, the second column data should not be greater than the first column and if it so focus on the second column.
And if the condition is valid then the total is computed and displayed on the third column. How can I do it using javascript?
  1. <asp:GridView ID="STUDENT_GRID"  
  2.   runat="server"  
  3.   AutoGenerateColumns="false">  
  4.     <Columns>                                  
  5.         <asp:TemplateField HeaderText="FIRST ASSESSMENT">  
  6.             <ItemTemplate>  
  7.                 <input type="number" id="frstAssmt" min="0" value="0" runat="server">  
  8.             </ItemTemplate>  
  9.         </asp:TemplateField>                                
  10.         <asp:TemplateField HeaderText="SECOND ASSESSMENT">  
  11.             <ItemTemplate>  
  12.                 <input type="number"  id="scndAssmt" runat="server" min="0" value="0">  
  13.             </ItemTemplate>  
  14.         </asp:TemplateField>  
  15.         <asp:TemplateField HeaderText="TOTAL">  
  16.             <ItemTemplate>  
  17.                 <input type="number"  id="ttl" runat="server" min="0" value="0">  
  18.             </ItemTemplate>  
  19.         </asp:TemplateField>  
  20.     </Columns>  
  21. </asp:GridView>  
 

Answers (3)