iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
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.
Hi Sunym,
Your code is almost right, but you need to add the following code:
var xcl = wgGetCellByElement(wgGetCellByName(rowObject, "Price")).Text;
var sl = wgGetCellByElement(wgGetCellByName(rowObject, "Quantity")).Text;
if (sl > xcl) {
alert("test");
return false;
}
Hope this help.
Regards,
Julia
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname