limit view on grid based on user group

Hi Mr Travelr, i need a help

how to code limit view on grid based on user group

exemple, if default group then only view 5 record on grid…

thank you for your help

use a global variable and change this value based on the group. eg [glo_limit]=5;
then use this variable in SQL with the LIMIT = [glo_limit]

Thank you for your help sir,

but something i need is like this… i have a product grid. and i want default user group only can see 2 records
how to code in product grid event??