AshishJoshi-asj / zfdatagrid

Automatically exported from code.google.com/p/zfdatagrid
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Ordering columns #157

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. $grid->updateColumn('name', array('order' => 4,));
2. $form->setEdit(1)->setDelete(1);
3.

What is the expected output? What do you see instead?

Column name on second (2) place after Edit and Delete columns
Column name on fourth (4) place, regardless of Edit and Delete

What version of the product are you using? On what operating system?

Please provide any additional information below.
I think order should not depend on Forms columns Edit and Delete. If you
remove one, and you haven't set order for every column, change of order occur.

Do you think column order should be independent of Forms actions Edit and
Delete?

Or should there be an option to set Edit and Delete to the right end?

Not sure...

Original issue reported on code.google.com by vlatko.b...@gmail.com on 12 Feb 2010 at 5:03

GoogleCodeExporter commented 9 years ago
Hi, 

You are right.

I will change this behavior...

thanks

Original comment by pao.fre...@gmail.com on 12 Feb 2010 at 5:04

GoogleCodeExporter commented 9 years ago
Hi,

ATTENTION: Option 'order' is now 'position', To avoid confusion with the 
'order' from DB

Should be fixed now. 

Best Regards,
Bento Vilas Boas

Original comment by pao.fre...@gmail.com on 12 Feb 2010 at 6:34

GoogleCodeExporter commented 9 years ago
Name change is a good idea. 

I do not know if this existed before, but when using all options:
  $form->setAdd(1)->setEdit(1)->setButton(1)->setDelete(1);
all ok

when using
  $form->setAdd(1)->setEdit(1)->setDelete(1);
or
  $form->setButton(1)->setEdit(1)->setDelete(1);

zfDebug informs the following:
Notice: Undefined index: button in
C:\Razno\Razvoj\WebRoot\PHP_inc\Bvb\Grid\Deploy\Table.php on line 1627

Also, looks something happened with hidden columns. Table layout changes (Edit 
and
Delete columns get very, very wide)

 $grid->updateColumn('lastname'); << layout OK
 $grid->updateColumn('lastname', array('hidden' => 1)); << layout not OK

When I remove all Style and class options they are not so wide, but still more 
than
double wide.
Any clue?

Original comment by vlatko.b...@gmail.com on 12 Feb 2010 at 7:28

GoogleCodeExporter commented 9 years ago
Hi,

Please update to the Revision 576

thanks

Best Regards,
Bento Vilas Boas

Original comment by pao.fre...@gmail.com on 12 Feb 2010 at 11:29

GoogleCodeExporter commented 9 years ago
Hi,

I updated to 577 this morning, but whole layout changed. :-o)

It seems that all fields/columns are added to the end of Grid, even though they 
are
Hidden.

I checked and last good rev was 574.

Here is also a summary of Notices:
   1. Notice: Undefined offset: 11 in
C:\Razno\Razvoj\WebRoot\PHP_inc\Bvb\Grid\Data.php on line 2032
   2. Notice: Undefined offset: 10 in
C:\Razno\Razvoj\WebRoot\PHP_inc\Bvb\Grid\Data.php on line 2032
   3. Notice: Undefined offset: 9 in
C:\Razno\Razvoj\WebRoot\PHP_inc\Bvb\Grid\Data.php on line 2032
   4. Notice: Undefined offset: 8 in
C:\Razno\Razvoj\WebRoot\PHP_inc\Bvb\Grid\Data.php on line 2032
   5. Notice: Undefined index: in C:\Razno\Razvoj\WebRoot\PHP_inc\Bvb\Grid\Data.php
on line 1491
   9. Notice: Undefined index: field in
C:\Razno\Razvoj\WebRoot\PHP_inc\Bvb\Grid\Deploy\Table.php on line 1706
  10. Notice: Undefined index: in
C:\Razno\Razvoj\WebRoot\PHP_inc\Bvb\Grid\Deploy\Table.php on line 1707
  17. Notice: Undefined index: in C:\Razno\Razvoj\WebRoot\PHP_inc\Bvb\Grid\Data.php
on line 1719
  21. Notice: Undefined index: in C:\Razno\Razvoj\WebRoot\PHP_inc\Bvb\Grid\Data.php
on line 1753

Original comment by vlatko.b...@gmail.com on 13 Feb 2010 at 6:28

GoogleCodeExporter commented 9 years ago
I also noticed pictures are missing in Export section. Just text (word, 
wordx,...)

Original comment by vlatko.b...@gmail.com on 13 Feb 2010 at 7:10

GoogleCodeExporter commented 9 years ago
Hi vlatko,

Can you please test it. Revision 578

On my tests everything is fine. 

If the problem continues, can you please post your $grid code?

Best Regards,
Bento Vilas Boas

Original comment by pao.fre...@gmail.com on 13 Feb 2010 at 2:47

GoogleCodeExporter commented 9 years ago
It continues. Attached is most of the code.

What I figured out is the following:
1. If no Hidden columns, and Position set, all works nice
2. With Position set, the exact number of Hidden columns is added to the right 
end of
the grid. First of those "virtual" columns has Sort arrows, others do not. No 
title,
no data. Empty.
3. Position NOT set, all works nice

Original comment by vlatko.b...@gmail.com on 13 Feb 2010 at 3:17

Attachments:

GoogleCodeExporter commented 9 years ago
Hi,

I've made a serial of tests setting several columns as hidden, setting 
position, and
everything works fine.

Can you please update to the latest revision and then use the new method
$grid->debug() so I can see what is going on?

Use this:

$grid->deploy();
print_r($grid->debug(true));
die();

This will serialize a few params.

Use this to view the data serialized

$grid->deploy();
echo "<pre>";
print_r($grid->debug());
die();

Best Regards,
Bento Vilas Boas

Original comment by pao.fre...@gmail.com on 13 Feb 2010 at 4:12

GoogleCodeExporter commented 9 years ago
Hi,

Here it is.

Original comment by vlatko.b...@gmail.com on 13 Feb 2010 at 5:08

Attachments:

GoogleCodeExporter commented 9 years ago
Hi.

One more update.

I think this is  it...

Revision 584

Best Regards,
Bento Vilas Boas

Original comment by pao.fre...@gmail.com on 14 Feb 2010 at 12:49

GoogleCodeExporter commented 9 years ago
Yes, it is. I tried several combinations, and all work. Excellent. :-)

Original comment by vlatko.b...@gmail.com on 14 Feb 2010 at 5:07

GoogleCodeExporter commented 9 years ago

Original comment by pao.fre...@gmail.com on 14 Feb 2010 at 1:06

GoogleCodeExporter commented 9 years ago

Original comment by bento.vi...@gmail.com on 3 Mar 2010 at 4:56