This is a migrated thread and some comments may be shown as answers.

Cursor position not on checkbox in grid column

2 Answers 67 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jürg
Top achievements
Rank 1
Jürg asked on 13 Jan 2014, 04:39 PM
Hi all

I've got a RADGrid with a GridCheckBoxColumn displaying a boolean value from my database. I hooked a JavaScript to this checkbox by adding an onClick event to the it's attributes. When the onClick event raises, a modal popup window is opened.

Basically everything is working but the position of my mouse click is not determined properly: I have to click just right from the checkboxes to have the popup window opened. When clicking on the (disabled) checkbox in the grid nothing happens.

How can I force the onClick event to be triggered from the correct position on the checkbox?

Thanks for every hint.

Juerg

2 Answers, 1 is accepted

Sort by
0
Accepted
Konstantin Dikov
Telerik team
answered on 16 Jan 2014, 12:51 PM
Hello Jürg,

The behavior that you are describing while the checkbox is disabled is expected and it is due to the fact that the "onclick" event does not fire. Please note that GridCheckBoxColumn generates standard input element and this is the default browser behavior for the disabled input (type="checkbox") elements. 

However, you could have a look at the following forum thread regarding the above, which could prove helpful: "How can I execute a function when a disabled checkbox is clicked?".

Regarding the positioning issue, for your convenience I have created a sample page, working as expected on my end. Please give it a try and see what differs in your project.


Regards,
Konstantin Dikov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Jürg
Top achievements
Rank 1
answered on 21 Jan 2014, 12:04 PM
Hello Konstantin

Thank you very much for your feedback. Since a click event on the disabled checkbox is not possible, I will try to find another implementation without the need of a checkbox. But nevertheless it's good to know that (and not having to spend more time for Investigation).

Kind regards

Juerg
Tags
Grid
Asked by
Jürg
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Jürg
Top achievements
Rank 1
Share this question
or