webismymind / editablegrid

EditableGrid is an open source Javascript library aimed at turning HTML tables into advanced editable components. It focuses on simplicity: only a few lines of code are required to get your first table up and running.
http://www.editablegrid.net
Other
795 stars 272 forks source link

Standard utilities like removeRow, addRow, dupplicateRow .. #132

Open tarto-dev opened 8 years ago

tarto-dev commented 8 years ago

Hi, After reading every single lines of code, I can't read anything about some standard actions on table, like remove a row or add a row, but I've seen a Prototype, that allow us to define our functions, but without clear documentation, that's horrible to extend.

Also, in demo files, many comments "don't use this in production", what should I use ?

To finish, I've implement the prototype contained into the Demo to remove Rows and Add ones. Once a line is removed, if I add a new one, it will be pushed on top of the table, with old data restored. That's not the expected feature here :/

tarto-dev commented 7 years ago

up ? :)

softwarehero commented 7 years ago

Curious to know if you got this working ? I'm looking at using this platform to edit scrollable tables.

ramonYcajal commented 7 years ago

hi benftwc, try this, this is just the code in my script, to add a row at the end of the table: editableGrid.insertAfter(editableGrid.getRowCount(), rowId, data,true); rowid is a counter adding 1 every time who adds a row, and data is a code to add a row if you have buttons in cells etc, true think that is the method of refreshing the grid but i am not shure about it......

You're right about the doc, it isn't clear at all and the examples doesn't help me too much... :/