How to create right editable grid?

20 views
Skip to first unread message

Xploit

unread,
Apr 25, 2008, 2:09:54 AM4/25/08
to PHP-Ext
Cut of my code for grid:

Setup ColModel:

$colconfig = new PhpExt_Grid_ColumnConfigObject($row['Field']);
$colconfig->createColumn($row['Field'],$row['Field'],
$row['Field'],null, null, null, true, false);
$f = new PhpExt_Form_TextField();
$f->setAllowBlank(false);
$colconfig->setEditor($f);

Setup Grid:

$grid = new PhpExt_Grid_EditorGridPanel();
$grid->setStore($store)
->setColumnModel($colModel)
->setAutoWidth(true)
->setAutoHeight(true)
->setBorder(false);

After, grid allow to edit my data. But when click on cell i see that
cell value:

<div id="ext-gen2126" class="x-grid3-cell-inner x-grid3-col-2"
unselectable="on">xploit</div>

How i can create working editable grid. Result should be
http://extjs.com/deploy/dev/examples/grid/edit-grid.html

P.S. Sorry for my English. I'm russian,

mb

unread,
Apr 28, 2008, 11:27:51 AM4/28/08
to PHP-Ext
Hi, show in the examples - there is a good simple example (examples/
form/form-grid.php)




On 25 Apr., 08:09, Xploit <dimat...@gmail.com> wrote:
> Cut of my code for grid:
>
> Setup ColModel:
>
> $colconfig = new PhpExt_Grid_ColumnConfigObject($row['Field']);
> $colconfig->createColumn($row['Field'],$row['Field'],
> $row['Field'],null, null, null, true, false);
> $f = new PhpExt_Form_TextField();
> $f->setAllowBlank(false);
> $colconfig->setEditor($f);
>
> Setup Grid:
>
> $grid = new PhpExt_Grid_EditorGridPanel();
> $grid->setStore($store)
> ->setColumnModel($colModel)
> ->setAutoWidth(true)
> ->setAutoHeight(true)
> ->setBorder(false);
>
> After, grid allow to edit my data. But when click on cell i see that
> cell value:
>
> <div id="ext-gen2126" class="x-grid3-cell-inner x-grid3-col-2"
> unselectable="on">xploit</div>
>
> How i can create working editable grid. Result should behttp://extjs.com/deploy/dev/examples/grid/edit-grid.html

Xploit

unread,
Apr 28, 2008, 1:46:29 PM4/28/08
to PHP-Ext
That example work fine. But i want inline edit grid cells. You can see
what i want by link (in first post).

mb

unread,
May 2, 2008, 10:43:36 AM5/2/08
to PHP-Ext
ahh, ok - sorry..

You should try it with the renderer...

have you test it?
Reply all
Reply to author
Forward
0 new messages