CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Preserving selections on grid update form

Print topic Send  topic

Author Message
Karen
Posted: 04/19/2002, 6:12 PM

I have a grid update form which allows users to select products to be ordered. However, along with the product selection, the users also have to enter a few other global order values which are checked when the submit button is clicked. In the event of an error caused by entering any invalid global order value(s), the page is displayed again with the error message but without the product selections so the user has to start all over again.

I would like to know how I can preserve the product selections in the event of an error message. Or perhaps, how to validate the global order values before clicking the submit button. I would like to hear ideas from anyone. Thanx.
Nicole
Posted: 04/20/2002, 3:03 AM

Karen,
to preserve values entered in other fields you should pass them through URL. It could be done by creating custom validation event. You should recreate all the validation code by yourself and out there. At the end check the value of error variable and once it is not empty redirect use to the same page but add string of parameters to page name. The string should contain the values of all entered fields.

Probably you'll be able to validate global values on client side using JavaScript. But it depends on case.
Karen
Posted: 04/20/2002, 5:02 AM

Dear Nicole,

I'm not quite sure where to start but here is more details of what I've done. I've implemented an Updateable Grid (grid type form with checkboxes and text boxes to allow multiple updates at once) as described in the article in the Tips & Articles section. And in the Open event of the form, where the checkboxes are scanned thru to see which are selected, I also have the validation code. If there are no errors, I will take each record selected on the grid and update/insert into the appropriate table(s). However, if there are errors, I want to be able to display the page again with the selected records on the grid.

These checkboxes and textboxes are defined as such in the form Before Show Event:
$fldbool = "<input type=checkbox name=bool|$fldcode value=on>";
$fldorderqty = "<input type=text name=orderqty|$fldcode value=0 SIZE=9>";
$fldreforderno = "<input type=text name=reforderno|$fldcode value=0 SIZE=6>";
$fldreforderline = "<input type=text name=reforderline|$fldcode value=0 SIZE=3>";

So I'm guessing that I should be putting some other values (variables instead of fixed) when defining them. But I'm not sure what to put there. Would you be able to give me some more clues? Thanx so much.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.