Anyway of having checkbox or dropdown on top of grid in toolbar?

I’ve spent a bit of the morning trying to see if this has been answered, and well, I couldn’t find anything, so here I am.

I have a grid form. I’d like to be able to have a CHECKBOX / radio buttons or Dropdown selector at the top of the form to help with filtering. In essense, I’d like at the top:

[ ] My Classes [ ] All Classes [ ] Open Only

And when they are selected, it refreshes the grid. I’d prefer NOT to have to go to the SEARCH screen.

any ideas?Thanks

Re: Anyway of having checkbox or dropdown on top of grid in toolbar?

I am Looking for the same feature !

Re: Anyway of having checkbox or dropdown on top of grid in toolbar?

Hi,
here’s a quick and easy solution but it is only suitable for a few (2-4) options.

Create the necessary amount of PHP-buttons.
Use the sc_redir() macro and call the grid itself, e.g.:

sc_redir(grid_protected,v_pos="D");// or whatever parameter you need to filter your list

Mark the variable in Application -> Global Variable as Type “OUT”;

For the “All”-Button use:

sc_reset_global([v_pos]);
sc_redir(grid_protected);

In the onScriptInit event do something like: (depends on your situation)

if(!empty([v_pos]))
{
	sc_select_where(add)="WHERE position = '[v_pos]'";
}

Hope this helps.
jsb