Get KoolPHP UI with 30% OFF!

Preselect Row (AutoGenerateRowSelectColumn = true) on Detail Table

Christian
Hi
Is there a way to Preselect an Row (Checkbox Column) on a Detail Table (ReadOnly)?
Chris
Posted Dec 7, 2015 Kool
Anthony Amolochitis
I haven't attempted it, but I be in the grid event handler, on the grid prerender, or the row prerender, you can accomplish this.
http://doc.koolphp.net/Controls/KoolGrid/PHP/GridEventHandler/index.php#OnGridPreRender
Give it a look.
Posted Dec 7, 2015 Kool -
Christian
Hi Anthony,
        class MyGridEventHandler extends GridEventHandler {
		function OnRowPreRender($row,$args){
			if (array_key_exists('GUID', $row->DataItem)) {
				if ($row->DataItem['GUID'] == '11183512'){
					$row->Selected = true;
				}
			}
  		}			
	}

did it!
Thank you very much.
Chris
Posted Dec 8, 2015 Kool -
Anthony Amolochitis
You are welcome. Thanks for showing me how you did it too. I may need that little piece of code one day.
Posted Dec 8, 2015 Kool