EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: guruhyes on January 25, 2022, 08:24:42 AM



Title: setting updateUrl in edatagrid plugin
Post by: guruhyes 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


Title: Re: setting updateUrl in edatagrid plugin
Post by: jarry on January 26, 2022, 02:21:51 AM
Please try this code.
Code:
$('#dgSubTujuan').edatagrid('options').updateUrl = ...
$('#dgSubTujuan').edatagrid('saveRow');


Title: Re: setting updateUrl in edatagrid plugin
Post by: guruhyes on January 30, 2022, 11:41:38 PM
It work,
thx