c1gridview clientside edit update

Posted by: ckarnik on 10 September 2017, 11:38 am EST

  • Posted 10 September 2017, 11:38 am EST

    Hi,


     


    I was wondering if there is a way to automatically trigger the _RowUpdating event on serverside once a cell is edited.  Currently in the clientside edit mode c1gridview waits until another row clicked or the row being edited has lost focus before triggering the server side c1grid_RowUpdating event.


    Should I look towards triggering the onAfterCellEdit(grid, args) function somehow? How do I get the args to pass to it?


    If I manually trigger it via the __doPostBack(...) method, proper C1GridViewRowEventArgs are sent to the server side.


     


    Suggestions?


    ck


     


     


     


     


     


     


     

  • Replied 10 September 2017, 11:38 am EST

    I meant to say __doPostBack(...) method DOES NOT sent proper C1GridViewRowEventArgs

  • Replied 10 September 2017, 11:38 am EST

    still searching for a way to trigger an update after a c1gridview cell is edited using clientside edit mode ....  a pencil icon shows up in the first column but it does nothing!


    basically looking for a way for a user to accept or cancel changes just as if row was put into edit mode  ( except that i'm using clientside edit)   ...  is there a client side function for updating the c1gridview that can be called via javascript?

  • Replied 10 September 2017, 11:38 am EST

    You should use update() to send client-side changes to server in client editing mode (AllowClientEditing = true). However you can't call it from editing event handlers since it causes recusrion and stack overflow.


    You can make a separate "Update" button:



    function updateBtnClick() {


      $find("C1GridView1").update();


    }


    alternatevely you can call update on time intervals from afterCellUpdate afterCellEdit event handlers:


    function onAfterCellUpdate() {


      window.setTimeout(function() {


        $find("C1GridView1").update();


      }, 500);


    }


    but I don't like the last option.

  • Replied 10 September 2017, 11:38 am EST

    Thanks for replying.


    after calling   $find("C1GridView1").update();  


    is it possible to refresh the grid if it is in callback mode?


    reason being:


    I have two columns that use grouping feature ie:



    when I update a column which is grouped ... a row needs to change its positioning from one group to another


    ie: if the rows are grouped by location: changing a row from "north" location to "south" should move the row to its proper grouping


    .update() method works properly for Internet Explorer 8


    after .update() in Firefox 3.6 edited row does not move to its proper grouping and and the spinner icon stays on the screen (pencil icon does disappear ...so the edit seems to be completed)


    is there a client side grid refresh that can be called? or callback options that I can set to refresh data properly?


    I've even tried placing C1.Web.UI.Controls.C1GridView.CallbackMode.full in the javascript function before calling .update().. .but it doesn't change the outcome.


    Any suggestions?

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels