CodeCharge – Using Code To Set Default Value Of Controls In An Editable Grid

How do you set the default value for controls repeated in rows within an editable grid? You use the BeforeShowRow event instead of the BeforeShow event. This code: //NewEditableGrid1_BeforeShowRow @9-47CB190A function NewEditableGrid1_BeforeShowRow(& $sender) { $NewEditableGrid1_BeforeShowRow = true; $Component = & $sender; $Container = & CCGetParentContainer($sender); global $NewEditableGrid1; //Compatibility //End NewEditableGrid1_BeforeShowRow //Custom Code @25-2A29BDB7 // ------------------------- … Continue reading CodeCharge – Using Code To Set Default Value Of Controls In An Editable Grid

Advertisements

CodeCharge – Disabled Control Not Saving Changes To Database

The way out of this is to change the control to Hidden and then put a visible dummy control to show the associated text which is not bound to the database. I have a listbox that is disabled and I want it to default to the current logged in user. I get errors saving the … Continue reading CodeCharge – Disabled Control Not Saving Changes To Database

CodeCharge – Using Ajax With Javascript

Here is another example of fetching a string from a database using client-side javascript with ajax where the backend webservice is a php page. Objective When the user changes the choice of values from a combobox, the application should use the selected value to query a database and return a string associated with the selected … Continue reading CodeCharge – Using Ajax With Javascript

Fetching New Record Id In CodeCharge

This example shows how to fetch the autonumber id from a newly inserted row in the database and use it as a parameter for showing another page after the insertion. In the record form's After Insert Event, add an Action of the type Declare Variable. Set the variable name to Redirect. Set the value of … Continue reading Fetching New Record Id In CodeCharge