mleibman / SlickGrid

A lightning fast JavaScript grid/spreadsheet
http://wiki.github.com/mleibman/SlickGrid
MIT License
6.81k stars 1.98k forks source link

Completely remove dependency on global variables, grid, dataview, columns, filters, etc. #993

Open MartyBolton opened 10 years ago

MartyBolton commented 10 years ago

Can you build an example that shows you can put two grids side by side with two grids, dataviews and separate filters while including your core grid functionality in a .js file so we can use the grid multiple times on view or share across pages in our app. The examples today are difficult to push to a common .js file that contain the base functionality we need across two or more grids for example. thanks Marty

GerHobbelt commented 10 years ago

Isn't examples/example-excel-compatible-spreadsheet.html, which shows two grid instances, a good enough starting point for this?

Okay, the grids are instantiated on HTML IDs so one instance per container ID, but that's how you would do this anyway if the grids have to be (somewhat) independent. Bit of a wrapper+scaffolding around slickgrid and you're good to go, or am I missing the obvious here?

(Oh and make sure you set the options.editorLock to a fresh editorlock instance each if you want to have all grid instances show/hide/commit their editors completely independently; IIRC vanilla slickgrid has the editorlock default set to a single lock, so editing a cell in grid A will signal the editor of the edited cell in grid B to commit&close before opening the new editor.)

6pac commented 8 years ago

https://github.com/mleibman/SlickGrid/issues/1100#issuecomment-177512028