handsontable icon indicating copy to clipboard operation
handsontable copied to clipboard

Custom cell editor

Open myisis opened this issue 13 years ago • 8 comments

This is not exactly a bug, but more of a question. How can I add a custom cell editor? I followed the Handsontable.AutocompleteEditor, but it's very difficult for me to figure out what's typeahead related and what's generic for other editors. I figured out that the first point of entrance seems to be onDblClick() from which the editor is started, but things like texteditor.beginEditing(instance, null, row, col, prop, keyboardProxy, true); aren't really accessible from outside of the jquery.handsontable.js file in a require.js environment which causes my custom editor to fail (this call may not be needed).

Anyway, some help on this would be appreciated.

Thanks.

myisis avatar Feb 23 '13 04:02 myisis

Hmm. I just realised that this has already been asked in #391 (but not yet resolved). Sorry, I should have looked for it more carefully.

myisis avatar Feb 23 '13 04:02 myisis

Think i'm searching the same. Try to find a solution to allow the user to add a URL and an string to specific cells. Any Ideas?

webserviceXXL avatar Feb 25 '13 16:02 webserviceXXL

Not sure if we're talking about the same thing. What I'd like to achieve is to show a dropdown menu once the user selects the cell. This is different to the typeahead that is currently implemented. But I'd imagine the same principle would apply for colour or date pickers (which I haven't seen an example for either).

myisis avatar Feb 27 '13 11:02 myisis

OK, seems to be slightly different. But i think at the end we both could do what we want. on my research i found a very nice soloution by compareninja.com. Take a look at: http://compareninja.com/tables/wizard#edit

But i think this isn't open source. ;)

Example: Bildschirmfoto 2013-02-27 um 15 41 00

webserviceXXL avatar Feb 27 '13 14:02 webserviceXXL

... and it isn't Handsontable (or seems to provide grid functionality)

myisis avatar Mar 01 '13 02:03 myisis

Have you tried setDataAtCell and your custom selector?

setthase avatar Mar 18 '13 14:03 setthase

No, I haven't. I struggle to find hooks that I can use to render the custom selector (although, I haven't looked at the most recent versions of Handsontable. I noticed that some work for datepickers had been done. I would imagine that this works the same way as the drop down). But setDataAtCell might be useful.

myisis avatar Mar 19 '13 02:03 myisis

For more information, please track changes to https://github.com/handsontable/handsontable/issues/391 issue.

AMBudnik avatar Apr 02 '15 11:04 AMBudnik