ryansuitposungkono / openjs-grid

Automatically exported from code.google.com/p/openjs-grid
0 stars 0 forks source link

Bug, Save Button #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
I'm using OpenJS-Grid 1.7 and enable inline editing.

What is the expected output? What do you see instead?
The Save button should work. When I press the button, it's not respon.

What version of the product are you using? On what operating system?
Win7, PHP 5.2 FireFox 4.0.1 Chrome 12

Please provide any additional information below.
Do you have sample database? I'm need sample DB for trying OpenJS better.

Original issue reported on code.google.com by ganjar.s...@gmail.com on 25 May 2011 at 6:35

GoogleCodeExporter commented 9 years ago
I have reproduced this error. Inline editing on, data is pulled and displayed 
properly, but after editing a field, the save button does not work. If the 
pager (footer) is turned off and the save button is at the top of the grid, it 
has no effect as well.

Original comment by verty...@gmail.com on 26 May 2011 at 7:06

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
CREATE TABLE IF NOT EXISTS `orders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `active` int(11) DEFAULT NULL,
  `purchase_date` date DEFAULT NULL,
  `order_total` varchar(20) DEFAULT NULL,
  `txn_id` varchar(20) DEFAULT NULL,
  `n_items` varchar(20) DEFAULT NULL,
  `discount_code` varchar(20) DEFAULT NULL,
  `order_type` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

Here my sample DB. I'm using auto increment. But it still doesnt work.

Original comment by ganjar.s...@gmail.com on 30 May 2011 at 6:59

GoogleCodeExporter commented 9 years ago
I fixed it for myself. It turns out that when I was "Adding" a row, then trying 
to "Save" - the sql generated had an empty id field. An auto-increment id fixed 
that issue, because "Adding" basically inserts a new row right away, and "Save" 
just updates that row. Simple fix. 

However, with pager false, it still seems to fail when saving. Trying to track 
that down.

Original comment by memoryen...@gmail.com on 30 May 2011 at 8:02

GoogleCodeExporter commented 9 years ago
ganjar, do you get an empty row inserted when you click the "add" button ? and 
if so, the id column increments by 1 ? Also, are you able to display your table 
in the grid ?

Original comment by coupons...@gmail.com on 31 May 2011 at 10:01

GoogleCodeExporter commented 9 years ago
Also, it helps a lot to have firebug open while debugging. 

Original comment by coupons...@gmail.com on 31 May 2011 at 10:49

GoogleCodeExporter commented 9 years ago
Yes, I got empty row when click "add" button.
Yes The id is increments by 1.
Yes the row is display in the grid. When I refresh the browser, the empty row 
is displayed in the last row.

If you all wanna try, you can download my sample OpenJS Grid. I download OpenJS 
grid v1.7 and modified it, little bit. Also I put the screenshot & the database.
For more information read "readme.txt"

here the mirror link.
http://hotfile.com/dl/119519715/8ffc160/openjs17.rar.html

Original comment by ganjar.s...@gmail.com on 1 Jun 2011 at 5:01

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
oh yeah I forgot, I'm using FireBug & FireQuery extension 
(http://firequery.binaryage.com/).
FireQuery is really helpfully for JQuery application.

You can see the sample using FireQuery in my screenshot.
The FieQuery Tells, the 'save' button has no JQuery event, not like Add & 
delete.

I hope this helpfully.

Original comment by ganjar.s...@gmail.com on 1 Jun 2011 at 5:18

GoogleCodeExporter commented 9 years ago
I haven't been able to get the save button to work when pager is false either. 

Does it work for you if the save button is in the footer ? It does for me.

Original comment by coupons...@gmail.com on 1 Jun 2011 at 10:18

GoogleCodeExporter commented 9 years ago
Guys there is a bug with the save button being at the location of "top" or 
"both".  If you omit this option and just use it on the bottom it should work. 
I will have this fixed for the next version.  Thanks for reporting this

Original comment by Seancla...@gmail.com on 5 Jul 2011 at 5:09

GoogleCodeExporter commented 9 years ago

Original comment by Seancla...@gmail.com on 5 Jul 2011 at 5:09

GoogleCodeExporter commented 9 years ago
ah your welcome, finally it will fixed.
BTW Nice Plugin.

Original comment by ganjar.s...@gmail.com on 5 Jul 2011 at 5:58

GoogleCodeExporter commented 9 years ago

Original comment by Seancla...@gmail.com on 20 Jul 2011 at 3:16