cwhisperer
cwhisperer

Reputation: 1926

Handsontable: How to pass id to a cell?

I'm using Handsontable and was able to fill a data grid with 16 rows and 9 columns retrieved from a database. Each cell represents a value from a table with a many to many relation. When saving the data-grid, an array is passed to view. I want to clearly identify each cell with the id provided from the table. Is this possible? I read about the setCellMeta(), but don't know how to apply this...

Upvotes: 0

Views: 1308

Answers (1)

destined
destined

Reputation: 324

What you can do is iterate all cells and set metadata for each cell (rows and columns) with the value you need.

myhot.setCellMeta(0,0,'Id',1);// where parameters are: row, col,propertyName, value.

later you can do the following to read :

myhot.getCellMeta(0,0) // rown, col

I hope it helps

Upvotes: 3

Related Questions