Page 1 of 1

Change Background Color of Detail Button

Posted: Sat Sep 07, 2013 10:41 pm
by mpol_ch

Hello
I have the tables Customer and Calls as Master and Details. The Detail Table is shown as Button with counted number of calls.
Im my Calls tables I have a Coloumn "Status".
Is that possible to change the background color of Detail Button in relation of Status?

If Call->Status== "Callback" Then Background_cOLOUR_of_Detail_Button == "Green".

Where to start?

Thanks
mpol_ch


Re: Change Background Color of Detail Button

Posted: Sun Sep 08, 2013 1:41 am
by mobhar

Simply use "Row_Rendered" server event. Read "Server Events and Client Scripts" in the help file for further information.


Re: Change Background Color of Detail Button

Posted: Sun Sep 08, 2013 7:54 pm
by mpol_ch

Hello mobhar

thanks for the response. But how can I identify the linkt to detail button to the detail table. I want only change the background of button that shows the related details tables to the maser...

mpol_ch


Re: Change Background Color of Detail Button

Posted: Mon Sep 09, 2013 10:21 am
by danielc

Detail button is belong to ListOptions. So, you need to use ListOptions_Rendered server event:
if (your condition)
$this->ListOptions->Items["details"]->CssStyle = "background-color: green"; // change the cell background color to green
else
$this->ListOptions->Items["details"]->CssStyle = "white-space: nowrap;";

You may check your html source to see the item name. If you are not using multiple detail table, the name will become items["detail_yourdetailtable"].

If you want to change button color, you need to write your jquery code.