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
380
Bind Checkbox and Update Row Help
posted

I have a WHDG with three levels.  I have a checkbox in the third level and it is the only field where editing is allowed.  I have the checkbox "checked" attribute bound to the database field, and it is checked if the value in the DB is true.

What I need to do is when a checkbox is clicked it would update the DB and reload the grid with the updated data.  I'm having some trouble getting this to work.  It appears that the checkbox is not actually bound to the DB field, and when checking the box, it doesn't trigger the postback to update the DB.

I'd REALLY appreciate it if someone could point me in the right direction here.  I've been fighting with this for a week.

THANKS!

  • 12679
    posted

    Hello Rayan,

    Let us know if you have any questins with this.

    Thanks

  • 33839
    Suggested Answer
    posted

    Hi,

    One thing you would want to do if you have this template column is to have autopostback set to true for the checkbox and in the CheckChanged server event, update your DB manually.

    Another option would be to have another column that is actually bound to your DB.  Then, on the client, when the checkbox changes checked status, call cell.set_value(checkbox.checked).  Then, it will update like any other cell for editing.

    regards,

    David Young