Get KoolPHP UI with 30% OFF!

kool list items lost when my kool grid commits

Abraham
hi i have 2 listbox, the 1 is a fileld list(listbox), the 2 is desired display field list(second_listbox), then my grid collumns are populated depending on the items on second_listbox, if somthing changes on second_listbox the grid changes during the autopostback and everything is wonderfull.
the problem is when i apply a filter on my grid the grid commits and when i get to retrieve the items in the second_listbox it says i have length of 0 so no items in there.. ofcourse the list still have the items displayed but i cant get the items in there during the grid commit phase.
by the way if i turnoff AjaxEnabled on my grid, everything works perfect mybe the whole problem is that my litsbox are not AjaxEnables ??? if soo where is an example of AjaxEnabling the grid with the update pannel???? mentioned in:
Spoiler content

here is the code i use to populate the grid:
	$listboxItems = $GLOBALS["second_listbox"];
	$listboxItems = $listboxItems->Items; //we get the items in the list
	
//the items are there during listbox auto postback but not during grid commit phase whats worng?? any javascript steeps i have to do on_grid_commit event in order to preserve the items in the list??
	for($x=0;$x<sizeof($listboxItems);$x++){
		$item = $listboxItems[$x];
		
                $headdertext = $item->Data["Text"];				
		$datafield = $item->Data["Value"];
		
		switch($item->Data["Value"]){
			case "fechaap":
				$column = new GridDateTimeColumn();
				$column->FormatString = "M d, Y";
				$column->Picker = new KoolDatePicker();
				$column->Picker->scriptFolder = $KoolControlsFolder."/KoolCalendar";
				$column->Picker->styleFolder = "sunset";	
				$column->Picker->DateFormat = "M d, Y";
				break;
			case "fotoanterior":
				$column = new GridImageColumn();		
				$column->Width=50;
				$column->CssClass="img50x50";
				break;
			
			default:
				$column = new emsiTextColumn();		
				break;
		}
		$column->DataField = $datafield;
		$column->HeaderText = $headdertext;
		$grid->MasterTable->AddColumn($column);		
		
	}
Posted Jul 26, 2016 , edited Jul 26, 2016 Kool