Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
915
BoundcheckboxField postback when checkbox changed?
posted

I am using the new BoundCheckBoxField and I want it to postback each time the checkbox is clicked so I can update the database. 

Is this possible?

I really don't want to have an "update" button anywhere and this is the ONLY column in the grid that is editable.

Parents
  • 33839
    Suggested Answer
    posted

    Hi RBonser,

    This should be possible.  There is no autopostback flag, but you can commit the value.  What you should do is handle the ValueChanged client event off of the EditingCore behavior.  In that, you could check for the correct column key and then call commit off of the editing core behavior.

    var grid = $find("WebDataGrid1");

    var editingCore = grid.get_behaviors().get_editingCore();

    editingCore.commit();

    You may need to handle the RowUpdating or RowUpdated server event for EditingCore in order to make row updating not do its batch mode.  I think commit is fixed so it should go back.  Hopefully this is what you're looking for.  Let me know if you have any other trouble with the new column or see room for improvement in it.

    regards,
    David Young 

Reply Children