0

I've started using flexicious data grid for the last couple of weeks and I have come up with a need to put a clickable button next to the value in my column. I add the button using javascript but the problem is that when I want to click on the button my item-click fires a row selection. I have to use both the row selection for other functionality and button click for popup functionality.

Is there some built in functionality for adding buttons in flexicious? I can't seem to find any in their documentation. Or if there isn't how can I move the button on top of the row so that clicking the button doesn't fire row click functionality?

strwoc
  • 511
  • 1
  • 9
  • 18

1 Answers1

0

I figured this out by keeping it simple and ignoring flexicious documentation.

I added

item-click="onGridItemSelectedOfferCombo"

and then in this function I did a small hover over button test

vm.onGridItemSelectedOfferCombo = function (evt){
   var isHovered = $('#clickableButton').is(":hover");
        if (isHovered == true) {
             //do my thing
        }
}
strwoc
  • 511
  • 1
  • 9
  • 18
  • 1
    Your question is rather confusing, but it looks like you want something like: http://htmltreegrid.com/newdocs/html/Flexicious%20HTMLTreeGrid.html?ConfigurationOptionsInteractiveH.html – flexicious.com Nov 17 '16 at 14:56
  • Hi, awesome that you're trying to help me with this, and yes, that is quite similar to what I wanted to achieve, except I still had to have the ability to click on the row, so enableCellClickRowSelect="false" was a problem. So I actually added the label, left the row click functionality and just ignored it if the mouse was hovering over the button when clicking. Thanks for trying to help but this isn't an issue anymore :D – strwoc Nov 17 '16 at 15:09
  • enableCellClickRowSelect will only affect that particular column. Clicking anywhere else on the row will select it. – flexicious.com Nov 17 '16 at 15:39
  • I still wanted to be able to click on the column and select the row, just not select the row when clicking on my imported button. The reason being the column was quite wide with the product name on the left and my details button on the right. – strwoc Nov 18 '16 at 07:17