CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.

YesSoftware Forums -> Archive -> GotoCode Archive

 Eliminate errors for insert using editable grid

Print topic Send  topic

Author Message
Posted: 01/04/2004, 8:09 PM

Hi All,

Happy New Year 2004.

I created an editable grid, and set the Empty Rows property to 10.
When viewing the live page, I only insert 2 rows.
After submitting, there will be errors for the rest 8 empty rows saying that the inserts failed.

How to eliminate the errors?

rgds, Nico
Posted: 01/06/2004, 6:35 PM

I forgot to mentioned that I'm using CCS2.
Posted: 01/06/2004, 6:44 PM

If you set a default value on any of the fields CCS thinks that each line has been changed.

If you wish to add default information you will need to do it in the "beforeinsert" event

Posted: 01/07/2004, 9:24 AM

Similar problem.

How do I set the value in the before insert event for a grid as each row element is incremented by a counter value?

Posted: 01/08/2004, 8:02 PM

Thx Edd,

It works.
Now I got another question.

I have in the grid a hidden control that's bounded to Modify_Date field in the table. In the Before_Build_Update event, I modified the value to "now()".
If I clicked "Submit", it will update all rows with that value.
I want only the rows modified are updated. How to do this?

rgds, Nico
Posted: 01/08/2004, 8:36 PM

Roger: - How do I set the value in the before insert event for a grid as each row element is incremented by a counter value?

In the Events Window declare a variable Counter OUTSIDE of any function (making it global). You can then Increment the counter by one prior to the insert.

Posted: 01/08/2004, 8:53 PM


Your problem is the stateless nature of the web (ie when a page is passed you have no idea what has been modified).

First way: I would suggest a Javascript onchange event that populates / or clears your hidden field.

Second way: is in the BeforeBuildUpdateEvent is to test the data that has been passed against the database, i.e. get all the fields in the form do a CCLookup and see if they are the same. If not then change the date.

Third way: Depending on your database use a before update trigger.

Sorry it's ugly anyway you look at it.



These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit

Internet Database

Visually create Web enabled database applications in minutes.

Home   |    Search   |    Members   |    Register   |    Login

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