Allow to set null for lookup value

QuestionsAllow to set null for lookup value
Marco asked 3 months ago

I set a column as lookup:

$col = array();
$col["name"] = "idCustomer";
$col["edittype"] = "lookup";
$col["editoptions"] = array("table"=>"Customers", "id"=>"id", "label"=>"customer");
$cols[] = $col;

My table’s column, however, allows the value to be null, and actually I need the user to set it. This is useful for example if the field is not mandatory. If I don’t have a customer, no id should be entered.

The rendered select contains the customer names only.

I tried:

  • with cellEdit using “canc/del” but on reload the last value is still there
  • with inline editing no way to remove the value
  • with edit dialog is the same

I would like either a null entry in the select or a way to set it null (i.e. del when editing inline or a checkbox when in dialog).

Is it possible or is there a different way to achieve my goal?

2 Answers
Abu Ghufran Staff answered 3 months ago

Hi,

I understand your case and will be updating you back after some working.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Abu Ghufran Staff answered 3 months ago

I’ve added this support in lookup.

You can email me with your payment email address OR order number at [email protected] to get the update.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

14 + 9 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?