Page 1 of 1

Show/hide Master/detail link base on row value

Posted: Tue Mar 21, 2023 5:35 pm
by vuongduongquoc

I need to show/hide the detail link when user click on each row to see the detail link. I put this code in list page / function Page_Render()
But it only works in case CurrentValue = '1'.
Where should i put this code please?

if ($this->gender->CurrentValue = '1') {
    $this->DetailPages["husband"]->Visible = False;
	$this->DetailPages["wife"]->Visible = True;
}
if ($this->gender->CurrentValue = '0') {
    $this->DetailPages["husband"]->Visible = True;
	$this->DetailPages["wife"]->Visible = False;
}

Re: Show/hide Master/detail link base on row value

Posted: Tue Mar 21, 2023 5:40 pm
by mobhar

The comparison operator should be double equal to (==) instead of single equal to (=).