jQWidgets Forums

jQuery UI Widgets Forums Grid How to make api call on checkbox click in grid

This topic contains 2 replies, has 2 voices, and was last updated by  baragon 6 years, 8 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author

  • baragon
    Participant

    Hello,
    I have a jqxGrid with hundreds of rows in it. One of the columns contains checkboxes. When a user clicks a checkbox, I want to make an api call to send the data from that row which the checkbox is located in, to the api. How would I do that?

    <div id="ScheduleMappingGrid" class="stretch-grid" data-bind="jqxGrid: {
    	source: items,
    	editable: true,
    	enablebrowserselection: true,
    	columns: [
    		{ text: 'Room Name', dataField: 'ClmName', width: 250, sortable: true },
    		{ text: 'Enable Scheduling', dataField: 'IsEnabled', width: 175, columntype: 'checkbox' },
    		{ text: 'Calendar ID', dataField: 'CalendarID' },
    	]
    }"></div>

    Martin
    Participant

    Hello baragon,

    An easy way for achieving this would be to bind to the cellendedit or cellclick event
    and make your api call if the call edited/clicked is from the checkbox column.
    Please, look at the following Example.

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/


    baragon
    Participant

    I was able to adapt your example for what I needed. Thank you.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.