In asp.net maker 12.0.4, I put the code under Grid Inserting in Server Event in my project
but its not working , it bypass the validation
public bool Grid_Inserting() {
// Enter your code here
// To reject grid insert, set return value to FALSE
var rsnew = GetGridFormValues(); // Get the form values of the new records as an array of array
//ew_End(rsnew); // Print the records and end the script
int sum = 0;
foreach (OrderedDictionary row in rsnew) // Loop through the new records
sum += Convert.ToInt32(row["amt"]);
if (sum < 100) {
// To cancel, set return value to false
CancelMessage = "The total sale must be more than 100.";
return false;
}
return false;
}
even it return the false on both conditions.
Even in Grid Inserted event i un-comment the ew_Write statement
but same issue, no activity found.
instead of display "Grid Inserted" grid insert complete and all grid records inserted successfully
where is the problem? i can't understand, plz help
// Grid Inserted event
public void Grid_Inserted(List<OrderedDictionary> rsnew) {
ew_Write("Grid Inserted");
}