EasyUI Forum
May 05, 2024, 10:24:41 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: setting updateUrl in edatagrid plugin  (Read 1885 times)
guruhyes
Newbie
*
Posts: 8


View Profile Email
« on: January 25, 2022, 08:24:42 AM »

hai everybody,
I am use edatagrid for inline editing than send the data to database,
it work well if i declare the updateUrl in document ready
ex :
Code:
<script>
   $(function(){
        $('#dgSubTujuan').edatagrid({
            updateUrl: '{% url 'saveSubTujuan' %}',
        });
   })
   function saveInline(){
      $('#dgSubTujuan').edatagrid('saveRow');
   }
</script>
but it not working when i try to change the update url in function
ex
Code:
  function saveInline(){
        $('#dgSubTujuan').edatagrid({
            updateUrl: '{% url 'saveSubTujuan' %}'+id,
        });
        $('#dgSubTujuan').edatagrid('saveRow');
  }
sorry for my bad english,
hope you understand
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: January 26, 2022, 02:21:51 AM »

Please try this code.
Code:
$('#dgSubTujuan').edatagrid('options').updateUrl = ...
$('#dgSubTujuan').edatagrid('saveRow');
Logged
guruhyes
Newbie
*
Posts: 8


View Profile Email
« Reply #2 on: January 30, 2022, 11:41:38 PM »

It work,
thx
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!