jquery-tabledit icon indicating copy to clipboard operation
jquery-tabledit copied to clipboard

MultiSelect editable ?

Open doudou6464 opened this issue 8 years ago • 6 comments

I would like to use a multiselect in jquery-tabledit ! It's possible ? Someone to help me ?

Thank you

doudou6464 avatar Nov 29 '17 13:11 doudou6464

Hi @doudou6464 !

Did you happen to find any solution for that?

I just came through the very same requirement.

goforgold avatar Dec 28 '17 12:12 goforgold

Hi @goforgold

No i don't find solution !

doudou6464 avatar Jan 02 '18 12:01 doudou6464

Hi @doudou6464 !

I have done some changes and able to implement the table edit with multi-select. Please use the below link code: https://github.com/markcell/jquery-tabledit/compare/master...sharadsoni:patch-1

Also, you need to read my comment carefully while using my code. Please let me know if this patch of code is helpful for you.

sharadsoni avatar Jan 05 '18 12:01 sharadsoni

Hi @sharadsoni , I was reviewing the replacement code but it does not work for the current version v1.2.3, how would it be only the 'multiple select' for version v1.2.3? Whereas textarea is already included by default in this latest version. Very grateful in advance.

servicomf5 avatar Feb 09 '18 15:02 servicomf5

I read the instructions but get an error: Uncaught ReferenceError: obj is not defined pointing to: input = '<input class="tabledit-input ' + settings.inputClass + '" type="text" name="' + settings.columns.editable[i][1] + '" value="' + obj.text() + '" style="display: none;" disabled>';

I found out that obj.text() should be replaced by ' + $.trim($(this).text()) + ' in all instances. Also input = should be replaced by var input =

One more thing needs to be changed at line 140 of sharadsoni's code

The correct code to retrieve an array should be: var input = '<select class="multiSelect tabledit-input ' + settings.inputClass + '" name="' + settings.columns.editable[i][1] + '[]" style="display: none; width:auto;" disabled multiple >';

javo222 avatar Sep 01 '20 18:09 javo222

For anyone coming to this in 2021, I had to make one slight change to @javo222's changes to the original PR created by @sharadsoni:

Replace instances of obj.text() with $(this).text()

limsammy avatar Jul 01 '21 01:07 limsammy