ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: Webauthor on March 06, 2020, 11:10:07 pm

Title: Bootstrap Split Button + Checkbox Column
Post by: Webauthor on March 06, 2020, 11:10:07 pm
Hi, I'd like to have a split button control on my checkbox column so I can have different actions for a row - e.g. Modify, Delete in addition to View.

Please see this fiddle - https://jsfiddle.net/webauthor/moj0yfsh/4/ - can you help me implement something like this?  Also, I'd like it that when the button is clicked, it does not fire the rowselect event.  I don't want the row to be selected when I click on a button because it's performing a different action - for that specific row.

Thanks
Title: Re: Bootstrap Split Button + Checkbox Column
Post by: Webauthor on March 16, 2020, 12:03:21 am
Hi, any help on this?
Title: Re: Bootstrap Split Button + Checkbox Column
Post by: paramvir on March 16, 2020, 11:24:30 am
Bootstrap split button in your jsfiddle was not working ( missing dependencies ) even outside the grid, so replaced it with jQueryUI selectmenu.

Quote
I don't want the row to be selected when I click on a button because it's performing a different action - for that specific row.

Attach click handler to cell and call evt.stopPropagation() in postRender callback.

Code: [Select]
postRender: function(ui){
          var $cell = this.getCell(ui)
          $cell.find('select').selectmenu()
          $cell.on('click', function(evt){
            evt.stopPropagation();                     
          })
},

https://jsfiddle.net/webauthor/moj0yfsh/4/