Page 1 of 1

Need help with button inside of grid

Posted: Fri Aug 30, 2013 3:09 pm
by Donnie
All,
I've converted a subfile and placed the grid in a tab panel. Then I added a new column with visual designer and placed a button in it called Button1. Button1 response property is bound to indicator field: indGoChart and onclick event property = pui.click();. The onrowclick event for the grid calls an external javascript function that toggles a checkbox in the first column on our grid.

I would like to allow the user to click on Button1 without triggering the onrowclick event of the grid.

It seems to me that the grid's onrowclick event could be conditioned based on cursor column value, but I was unable make that work.

Any help is greatly appreciated.
Thanks,
Donnie

Re: Need help with button inside of grid

Posted: Sun Sep 01, 2013 2:40 am
by Scott Klement
We don't support buttons having both an 'onclick' and a 'response.' You should only have one or the other. If all your onclick does is call pui.click() then you shouldn't need the onclick, just use the response, it will automatically submit your screen back to the server.

If you truly need to run Javascript code on the button click, but still have it set on an indicator, I would recommend placing a second button on the screen, and making it a hidden button. That way, you can use the onclick of your regular button to execute Javascript, and end that Javascript with a pui.click() that clicks the hidden button. Then the hidden button can have a response with an indicator. But, unless your onclick does more than just pui.click(), a simple response should be all you need.

As for the onrowclick being triggered... that I'd have to look into further. To do that, I'd need a JSON dump of your screen. You can create this for me by pressing Ctrl-F9 while on your screen. The browser will ask you to save a file (named json.txt, by default) to your PC. Save it, and then post it here (or e-mail it to support@profoundlogic.com)