Choose your database:
AnySQL
MySQL
MS SQL Server
PostgreSQL
SQLite
Firebird
Oracle
SQL Anywhere
DB2
MaxDB

Subscribe to our news:
Partners
Testimonials
Ran Cole: "We bought the tool last week and want to say how much we love it. We've found it not only powerful, but very user friendly. We have used the tool to create an interface that manages our MySQL DB for different types of users".
Patrick Biegel: "Thanks a lot for your fast reply and the great solution! It works now and that's really important! The PHP Generator for MySQL is a great software".

More

Add your opinion

PHP Generator for MySQL online Help

Prev Return to chapter overview Next

removeItem

Removes an item from a checkbox group or a multiple select.

 

Signature:

function removeItem(value)

 

Example:

The code below placed in the OnInsertFormEditorValueChanged and OnEditFormEditorValueChanged changes the content of the 'Clothes' checkbox group depending of the selected season.

 

if (sender.getFieldName() == 'season') 

{

 var $item_count = editors['clothes'].getItemCount(); 

 if ($item_count == 6)

   {

    if (sender.getValue() == 'Winter')

       {

       editors['clothes'].removeItem('Shorts');

       editors['clothes'].removeItem('Sandals');

       editors['clothes'].removeItem('Swimsuit');

       }

    else

    {

      editors['clothes'].removeItem('Coat');

      editors['clothes'].removeItem('Boots');

      editors['clothes'].removeItem('Cap');

    }

  }

  else

  {

    editors['clothes'].clear();

    if (sender.getValue() == 'Winter')

       {

       editors['clothes'].addItem('Coat','Coat');

       editors['clothes'].addItem('Boots','Boots');

       editors['clothes'].addItem('Cap','Cap');  

       }

    else

    {

       editors['clothes'].addItem('Shorts','Shorts');

       editors['clothes'].addItem('Sandals','Sandals');

       editors['clothes'].addItem('Swimsuit','Swimsuit');

    }

  }

 

The screenshot demonstrates the result of the fired event.

 

 

See also: addItem, getItemCount, clear



Prev Return to chapter overview Next