public static function link($column, $i, $row)
 {
     $value = $row[$column->index ?: 0];
     $control = new MLink();
     $n = count($row);
     $action = $column->action ?: $column->href;
     if (preg_match_all('/#([^#]*)#/', $action, $matches)) {
         if (is_array($matches[1])) {
             foreach ($matches[1] as $match) {
                 $action = preg_replace('/#' . $match . '#/', trim($row[$match]), $action);
             }
         }
     }
     if ($column->options) {
         $control->setText(($column->grid->showid ? " ({$value})" : '') . $column->options[$value]);
     }
     $action = str_replace('#?#', $value, $action);
     $control->setId(uniqid());
     $control->setAction($action);
     $control->setText($value);
     $control->setClass('mGridLink');
     return $control;
 }