Oct 14, 2011, 1:58 PM
[CLOSED] Grid Checkbox Is Being Checked When User Clicks Hyperlink in a Column
Hello,
I have a gridview with a checkboxselectionmodel. One of my columns contains a hyperlink which spawns a popup window. When a user clicks the hyperlink, the new window pops up, but the gridview row becomes selected. I need to allow the user to click the hyperlink without causing the row to be selected.
Any thoughts?
Here is the code surrounding the column that contains the hyperlink:
I have a gridview with a checkboxselectionmodel. One of my columns contains a hyperlink which spawns a popup window. When a user clicks the hyperlink, the new window pops up, but the gridview row becomes selected. I need to allow the user to click the hyperlink without causing the row to be selected.
Any thoughts?
Here is the code surrounding the column that contains the hyperlink:
<ext:Column Hidden="true" Hideable="false" Header="Custom URL" DataIndex="customurl">
<Renderer Fn="renderCustomURL" />
</ext:Column>
Here is the javascript function referenced by the renderer:<script type="text/javascript">
var renderCustomURL = function(value, p, record) {
if (record.data.enablecustomurl == true) {
return String.format('<a href=javascript:openCustomURLWindow("{0}")>{1}</a>', record.data.customurl, record.data.customurlname)
}
}
function openCustomURLWindow(url) {
window.open(url, 'CustomURL', 'menubar=yes,status,resizable,scrollbars=yes,alwaysRaised,height=600,width=850');
}
</script>
Last edited by Daniil; Oct 14, 2011 at 6:20 PM.
Reason: [CLOSED]