Hello, I have a Grid, with initial module “Search”.
What I want to achieve is, show in the Grid Header (in my case is the Search Header, and the Grid header is hidden, but it doesnt matter for my issue I guess)
the number of records displayed!
It’s easy when you load the grid, it shows the correct number, but I want that when an user uses the filter, it updates that number in the header!!
my current code:
$where_clause = {sc_where_current};
$rowcount = " SELECT COUNT(*)
FROM TblItemList
$where_clause";
sc_lookup(myrecord,$rowcount);
[Recordcount] = '('.{myrecord[0][0]}.')';
Then I use in the Header variable field this global variable.
It only works on the first load of the grid! It shows the correct amount of records.
But as soon as I use a filter and the grid is updated with less records,
it doesn’t update the value in the header,
and to be honest, I’m not even sure that {sc_where_current} is working after the initial load,
as I tried a var_dump with that global variable in every event of the grid and the search, and it never updates the variable value after the initial loading of the grid!
Maybe my attempt is wrong,
so does someone know how to show in the HEADER of a GRID, the CURRENT number of records displayed?