HI
I wish to hide a row when an unwanted word appears.
For example, if the word "yellow" is entered in any field, the entire row is hidden,
TIA
hide a row when an unwanted word appears
Re: hide a row when an unwanted word appears
Hi,
you can use the _init hook and add to the $options-QueryWhere your criteria that shall not be shown as a result.
you can use the _init hook and add to the $options-QueryWhere your criteria that shall not be shown as a result.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: hide a row when an unwanted word appears
Thanks for your post
I got it to work with the below code inserted in footer-extras
Just thought I would share
Change the values "table" "field" "word to hide row" to suite your site
I got it to work with the below code inserted in footer-extras
Just thought I would share
Change the values "table" "field" "word to hide row" to suite your site
Code: Select all
<script>
$j(function(){
$j('.table-field').each(function(){
var field = $j(this).text();
if(field == 'word to hide row'){
$j(this).parents('tr').hide();
}
})
})
</script>
23.17
Re: hide a row when an unwanted word appears
Please note, with your approach using Javascript the information at the bottom of the table ("Showing records 1 to 10 of n") will be misleading and perhaps confusing to the users, because there will be (n-x) rows, not (n) rows after hiding x rows according to your filter.
In my personal opinion pböttcher's solution is much more efficient and accurate. Filtering will be done on serverside already and footer information will always be correct.
In my personal opinion pböttcher's solution is much more efficient and accurate. Filtering will be done on serverside already and footer information will always be correct.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: hide a row when an unwanted word appears
Thanks to the two of you for your input.
I'm not a coder, so I am currently searching
google for a solution,
Funny enough, googling " $options-QueryWhere" brings up appgini forum pages,
Thanks
P
I'm not a coder, so I am currently searching
google for a solution,
Funny enough, googling " $options-QueryWhere" brings up appgini forum pages,
Thanks
P
23.17