Skip to content

Change Search Default Value

What I want is to be able to specify a default value in the search drop down. I want "Los Angeles" is always selected when the search is first appeared. My code snippet:

$bunits = "LA:Los Angeles;NY:New York"; 
$dg->set_col_edittype("business_unit", "select", $bunits, false);

However, The phpGrid always add "All" as the first option in the dropdown. How can I change that?


If you dont' have access to the source code, the workaround is to use javascript to remove the first option "All"

jQuery("#gs_business_unit status option[value='']").remove();

Feedback and Knowledge Base