CodeCharge Studio
search Register Login  

Visual PHP Web Development

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Editable Grid inserts empty records

Print topic Send  topic

Author Message
RoyBaird

Posts: 115
Posted: 08/29/2008, 10:37 AM

I have an editable grid that I populate one of the fields from a session variable. I am using auto-new-row code to give me a new row when the current is filled. The problem is when submitting, I get an extra record with only the field I populated filled in. There are several ways to stop this, but I am not a PHP programmer. Any suggestions on how to check for an empty field and not insert a record?

Thanks,
_________________
Roy
View profile  Send private message
wkempees


Posts: 1679
Posted: 08/29/2008, 4:25 PM

Roy,

Your requirement is described here:
Help file, Search: Prevent Operation individual Editable Grid
So, in your editable grids Before Execute Insert
(In Design Click the E.Grid, Properties, rightclick the event, choose CustomCode)
enter the following code, replace 'fieldname' by the name of your textbox
  
if ( !$Component->fieldname->GetValue()) {  
    $Component->DataSource->CmdExecution = false;  
    }  

In the Helpfile you see $Task mentioned, however the better method is to use $Component
(in this case very handy) to refer to the current component (handy because I do not know your Component's name as you did not mention gridname, datasourcename nor fieldname to be tested).

Quote :
am not a PHP programmer
resulted in maybe patronizing (not intended) elaborate explanation.

Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message

Add new topic Subscribe to topic   


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

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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