optikalefx / OpenJS-Grid

OpenJS Grid is the easiest jQuery Grid ever. With very little work you can have a data grid that can do everything from sorting and searching to complex database queries. Best of all, its open source. So you can learn how it's all done.
http://square-bracket.com/openjs
MIT License
96 stars 46 forks source link

saving #21

Closed tokick4 closed 11 years ago

tokick4 commented 11 years ago

Sean, what is causing this: saveable: [idinspection, inspection_date, am_pm, pass_failed, Permit_No] 0: "idinspection" 1: "inspection_date" 2: "am_pm" 3: "pass_failed" 4: "Permit_No" only 4 of my 7 columns on the table are showing in the console as saveable.

optikalefx commented 11 years ago

Are 3 of your columns joined off other tables? OpenJSGrid can only by default save to original table from $grid = new Grid($Table)

tokick4 commented 11 years ago

yes they are as you can see in #20 comments that I posted

tokick4 commented 11 years ago

Sean, Is there a save function that updates the sql, I need to mend it change a enum value automatic upon updating

optikalefx commented 11 years ago

I don't have any places to interject into saving, BUT you can alter your data however you need to in the POST before you save.

You can also call $grid = new Grid($table) WITHOUT the save key, and then use $grid->save() your self, but you should read the PHP file on that if you're going to fully customize the save. You'll need to learn about $grid->getSaveArray();

optikalefx commented 11 years ago

idemployee will be in the list when you take it out of the fields array. It can't save right now because for the select box to work, it has to be the id of the field that goes with the select box. As in, the id that choose which option to show for that drop down. For selects, dont have any fields set, just let it show the raw number. The select functions will turn it into the drop down.

tokick4 commented 11 years ago

Thank's this help men alot

optikalefx commented 11 years ago

Sure, I still need to detail this kind of custom stuff on the web page. Documentation takes FOREVER