Get KoolPHP UI with 30% OFF!

Can I add a row to the grid master table?

Anthony Amolochitis
If I have the following code in the grid pre-render event, how do I add a row for display purposes only.
I could not find a method to do the add new grid row.
Basically if a row is not in the table the grid is pulling from, I would like to "show" what the default action/behavior of my system will be.
    /**
     * @param KoolGrid $grid
     * @param array $args No Data
     */
    function OnGridPreRender($grid,$args)
    {
        $mastertable = $grid->getinstancemastertable();
        $rows        = $mastertable->GetInstanceRows();
        // $gridRow = new gridrow(); // for debugging and method access oinly
        
        // determine if all three items exist
        foreach( $rows as $gridRow )
        {
            if( isset( $gridRow->DataItem[CustomerPropertyList::ShowWhiteLabel] ) )
            {
                $this->hasShowWhiteLabelRow = true ;
            }            
            
            if( isset( $gridRow->DataItem[CustomerPropertyList::AssignedWhiteLabel] ) )
            {
                $this->hasShowAssignedTemplate = true ;
            }
            
            if( isset( $gridRow->DataItem[CustomerPropertyList::AddOrderNameToAutoCrmProviderTag] ) )
            {
                $this->hasShowCrmProviderWithOrderInfo = true ;
            }
        }
        // This is where I want to add a row to the KoolGrid just for display purposes.
        // How do I add it.
        
    }
Posted Nov 9, 2015 Kool