problem about OnRowValidate

1 reply. Last post: December 3, 2009 4:50 AM by Julia Wijaya
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
sunymMember

Hello,

    During using WebGrid, i encountered a problem. Some codes i have wrote:

    function WebGrid1_OnRowValidate(rowObject)
       {
         

           var xcl = wgGetCellByName(rowObject, "Price").cellValue;
          var sl = wgGetCellByName(rowObject, "Quantity").cellValue;
          if (sl > xcl)
         
          {
              alert("test");
              return false;  
           }
       }

First time ,when i change the number of "price" and "Quantity"  together , if "Quantity" more than "Price",it will show me a message.

If i change the number of "price" and "Quantity"  together , and "Quantity" less than "Price" ,it didn't show me a message. Work fine.

But then if i olny change the number of "Quantity" and make it less than "Price" , it still show me a message. It seems that "sl > xcl" didn't work. So i want to know why? And how to do if i need this feature.

 

All times are GMT -5. The time now is 9:18 AM.
Previous Next