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
Need help with button inside of grid
-
- New User
- Posts: 5
- Joined: Thu Feb 09, 2012 11:41 am
- First Name: Donnie
- Last Name: Sanders
- Company Name: TMW Systems
- State / Province: North Carolina
- Country: United States
- Contact:
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Need help with button inside of grid
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)
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)
Who is online
Users browsing this forum: No registered users and 3 guests