Title: Programatically added multiple combogrid not working Post by: Alfred on April 26, 2018, 10:47:26 AM In JqueryUI autocomplete, what I am asking could be easily achieved. I tried all day long to make it work, still it does not. See the code I am working on:
HTML Code: <div class="easyui-panel" fit="true" style="padding:20px;"> JS (Easyui) Code: $(document).ready(function() { In JQueryUI, when we add more rows, the psearch class is automatically identified as autocomplete. But Combogrid could not be detected. Another problem here is I could not set the value of the other combogrid and input text(quantity and rate) when I select the item in the first row of the description column. Of course, adding more rows with combogrid is not possible at all. Though I could make it work in jQueryUI, I want its version in Easyui. I don't want to depend on JQueryUI. Please help. Regards Dove Title: Re: Programatically added multiple combogrid not working Post by: jarry on April 26, 2018, 06:43:24 PM The datagrid has the built-in editing functionality. You can define the 'combogrid' editor for the 'product' column, append a new row and edit it. After saving the row, the combogrid's row will be updated to the datagrid. For more information please look at this example:
http://code.reloado.com/ipopes/edit#preview Title: Re: Programatically added multiple combogrid not working Post by: Alfred on April 26, 2018, 08:19:25 PM My requirement is that I want to save all the added rows to the database in one go. Another thing is I want to set the value of code and rate and give a value of 1 to the quantity column. My requirement is exactly the same as this one. Please look at this tutorial. http://demo.smarttutorials.net/invoice-script-php/invoice.php (http://demo.smarttutorials.net/invoice-script-php/invoice.php).
Thanks for the reply. I hope you can help me come at the desired solution in easyui. Regards, Dove Title: Re: Programatically added multiple combogrid not working Post by: jarry on April 27, 2018, 01:21:16 AM Please look at this updated example http://code.reloado.com/ipopes/2/edit#preview
Title: Re: Programatically added multiple combogrid not working Post by: Alfred on April 27, 2018, 04:50:48 AM Thanks Jarry, your answer is great. If I were to do the same, it would take me around half a year. I have one final question though. I want to add more inputs outside the table. When I click the save All Button, I want to send the value of those inputs with the JSON string for saving them into the database. Since the table is not a normal form, I don't know how to do. I am using php. I wonder if you could help me.
Thanks and regards, Dove Title: Re: Programatically added multiple combogrid not working Post by: jarry on April 27, 2018, 08:29:50 PM It's simple to post the data to server, just wrap it with a <form> and post this form's data. For more information please take a look at this example.
http://code.reloado.com/ipopes/3/edit#preview Title: Re: Programatically added multiple combogrid not working Post by: Alfred on April 28, 2018, 10:03:04 AM Thanks a million. It works fine. You are the hero. Why do I need to press enter key to update the tax. Why is it not updating while typing.
Here is my attempt which is not working, I still have to press Enter key. Code: $('#tax').textbox({ Title: Re: Programatically added multiple combogrid not working Post by: jarry on April 28, 2018, 03:46:33 PM You do not need to press enter. Focus out will trigger the onChange event that will call the calc function.
|