Page 1 of 1

card view or table view on list page - user based

Posted: Sat Dec 03, 2022 8:41 pm
by mavel

Hi,
I want to show records with card view (multiple column) to users other than administrator on the list page. only the table view (single column) will be shown to the administrator. How can I do that? I searched the forum, I couldn't find any sample code. Because it's related to view items


Re: card view or table view on list page - user based

Posted: Sun Dec 04, 2022 9:17 am
by mobhar

Simply put this following code in Page_Load server event of the List Page:

if (IsAdmin())
    $this->MultiColumnLayout = "table";
else
    $this->MultiColumnLayout = "cards";