set default drop down to match default search

Questionsset default drop down to match default search
Michael W Olson asked 2 years ago

Hi again. Sorryb to ask so many questions but, I have set a default search on the grid using the below code. How do I set the dropdown filter selection on the “Approval” column to match that default search?

 

// default grid to show only pending approvals
$sarr = <<< SEARCH_JSON
{
“groupOp”:”AND”,
“rules”:[
{“field”:”approval”,”op”:”eq”,”data”:”Pending”}
]
}
SEARCH_JSON;
$opt[“search”] = true;
$opt[“postData”] = array(“filters” => $sarr );
//$opt[“persistsearch”] = true;

1 Answers
Michael Olson answered 2 years ago

Never mind. I found it in a demo file. needed to add:

 

“defaultValue”=>‘Pending’,

Your Answer

2 + 11 =

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?