EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 05, 2024, 04:39:35 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
General Discussion
>
How do i capture click event for cell in easyui-propertygrid?
Pages: [
1
]
« previous
next »
Print
Author
Topic: How do i capture click event for cell in easyui-propertygrid? (Read 12553 times)
codeguyross
Newbie
Posts: 15
How do i capture click event for cell in easyui-propertygrid?
«
on:
November 21, 2013, 09:45:56 AM »
Hello,
How do I capture the click event when clicking a cell in the easyui-propertygrid? Here are some of the things i have tried:
$( '#myPropertyGrid').propertygrid().click(function( event ) {
$( "#log" ).html( "clicked: " + event.target.nodeName );
});
$(document).click(function() {
$( "#log" ).html( "clicked: " + event.target.nodeName );
});
$( "body" ).click(function( event ) {
$( "#log" ).html( "clicked: " + event.target.nodeName );
});
$( "myPropertyGrid" ).click(function( event ) {
$( "#log" ).html( "clicked: " + event.target.nodeName );
});
$( "*" ).click(function( event ) {
$( "#log" ).html( "clicked: " + event.target.nodeName );
});
$( "propertiesPanel" ).click(function( event ) {
$( "#log" ).html( "clicked: " + event.target.nodeName );
});
$( "#propertiesPanel" ).click(function( event ) {
$( "#log" ).html( "clicked: " + event.target.nodeName );
});
////////////////////////////////////////////////////////////////////////////
function clickHandler(e){
var elem, evt = e ? e:event;
if (evt.srcElement) elem = evt.srcElement;
else if (evt.target) elem = evt.target;
alert (''
+'You clicked the following HTML element: \n <'
+elem.tagName.toUpperCase()
+'>'
)
return true;
}
document.onclick=clickHandler;
This is related to another question i have about opening a dialog window when clicking a cell in the easyui-propertygrid. I am pretty sure i can use javascript to open the dialog but I would need to know how to capture the click event first.
Logged
codeguyross
Newbie
Posts: 15
Re: How do i capture click event for cell in easyui-propertygrid?
«
Reply #1 on:
November 21, 2013, 10:22:16 AM »
If anyone needs to know how to do this I have found a solution. You can capture the click event for a cell in a property grid with the following code.
$('#myPropertyGrid').propertygrid({
onSelect: function (rowIndex, rowData)
{
alert (''
+'You clicked the following HTML element: \n'
+rowData.name
);
}
});
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...