public static function createById($gridId, $ignoreError = false)
    {
        if (isset(static::$cache[$gridId])) {
            return static::$cache[$gridId];
        }
        
        $result = self::fetchResult($gridId, $ignoreError);
        
        if ($result) {
            $builder = GridBuilder::create();
            $classes = self::prepareClasses($result);
            $grid    = self::buildGridColumns($builder, $result, $classes);
            $grid->setRowClass($result->rowClass);

            self::buildColumnResets($result, $grid);
        } else {
            $grid = new Grid();
        }

        static::$cache[$gridId] = $grid;

        return static::$cache[$gridId];
    }