Click event for single column in DataGrid
I can add an event listener to a DataGrid of type
ListEvent.ITEM_CLICK, which is triggered when the user clicks any
part of an entire row in a DataGrid. I want to trigger a click
event for just one column. I only want to run a function when the
user clicks in just the first column of the DataGrid, and not run
trigger the event if they click in any other column. Any help would
be much appreciated.
Accessing the event.target returns the entire DataGrid, not
the DataGridColum. Any way to get just the DataGrid column?
Similar Messages
-
How to raise on click event for Single Markable cell in WD Table
Hi All,
I want to raise an event when a cell is clicked on Single Markable Cell and get the row and column of that cell.
I have tried all the events of the table and also On Enter event of input Field.
But I am not able to trigger on click event .
Please help me out. Points will be rewarded.
Thanks,
AnilHi Anil,
If the cell editor is a link to action then it triggers the ON CLICK event , Write the following code into
the ON CLICK event handler to get the selected Row and Column ID.
Event Properties is a node with two attributes Name and Value of type string.
data: lr_node type ref to if_wd_context_node,
lt_event_properties type wd_this->elements_event_properties,
ls_event_properties type wd_this->element_event_properties.
field-symbols: <l_value> type any.
* fill internal table
ls_event_properties-name = 'COLUMN_ID'.
ls_event_properties-value = r_param->column.
append ls_event_properties to lt_event_properties.
ls_event_properties-name = 'INDEX'.
ls_event_properties-value = r_param->index.
append ls_event_properties to lt_event_properties.
ls_event_properties-name = 'ATTRIBUTE'.
ls_event_properties-value = r_param->attribute.
append ls_event_properties to lt_event_properties.
assign r_param->value->* to <l_value>.
ls_event_properties-name = 'VALUE'.
ls_event_properties-value = <l_value>.
append ls_event_properties to lt_event_properties. -
What is the recommended way to handle mouse click events for custom nodes that subclass Panes?
Hi,
I have created a custom node that is a StackPane containing a Label on top of a Polygon.
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Polygon;
public class CustomHexagon extends StackPane {
private Polygon hexagon;
private Label overlayText;
public CustomHexagon( String text, double... points ) {
this.hexagon = new Polygon( points );
this.overlayText = new Label( text );
overlayText.setStyle( "-fx-font-weight: bold;" );
hexagon.setStroke( Color.GREEN );
hexagon.setStrokeWidth( 5.0 );
hexagon.setFill( Color.WHITE );
this.getChildren().addAll( hexagon, overlayText );
// Lays out the node where it should be according to the points provided for the Polygon.
this.setLayoutX( points[0] - getLayoutBounds().getMinX() );
this.setLayoutY( points[1] - getLayoutBounds().getMinY() );
// Show the border of the StackPane.
this.setStyle( "-fx-border-color: black; -fx-border-width: 1; -fx-border-style: dashed;");
public String getOverlayText() {
return overlayText.getText();
I want to display a tesselation of these custom hexagons. Because a CustomHexagon is a StackPane, not a Polygon, MouseClick events can be picked up when the mouse is clicked outside of the stroke of the hexagon but still within the StackPane (which takes up a rectangle larger than the hexagon). The following program demonstrates this.
public class Main extends Application {
@Override
public void start(Stage primaryStage) {
Group root = new Group();
CustomHexagon[] hexagons = {
new CustomHexagon( "00", 10.0, 10.0, 30.0, 10.0, 40.0, 27.3205080756, 30.0, 44.6410161512, 10.0, 44.6410161512, 0.0, 27.3205080756 ),
new CustomHexagon( "01", 70.0, 10.0, 90.0, 10.0, 100.0, 27.3205080756, 90.0, 44.6410161512, 70.0, 44.6410161512, 60.0, 27.3205080756 ),
new CustomHexagon( "02", 130.0, 10.0, 150.0, 10.0, 160.0, 27.3205080756, 150.0, 44.6410161512, 130.0, 44.6410161512, 120.0, 27.3205080756 ),
new CustomHexagon( "03", 190.0, 10.0, 210.0, 10.0, 220.0, 27.3205080756, 210.0, 44.6410161512, 190.0, 44.6410161512, 180.0, 27.3205080756 ),
new CustomHexagon( "04", 250.0, 10.0, 270.0, 10.0, 280.0, 27.3205080756, 270.0, 44.6410161512, 250.0, 44.6410161512, 240.0, 27.3205080756 ),
new CustomHexagon( "10", 40.0, 27.3205080756, 60.0, 27.3205080756, 70.0, 44.6410161512, 60.0, 61.961524226799995, 40.0, 61.961524226799995, 30.0, 44.6410161512 ),
new CustomHexagon( "11", 100.0, 27.3205080756, 120.0, 27.3205080756, 130.0, 44.6410161512, 120.0, 61.961524226799995, 100.0, 61.961524226799995, 90.0, 44.6410161512 ),
new CustomHexagon( "12", 160.0, 27.3205080756, 180.0, 27.3205080756, 190.0, 44.6410161512, 180.0, 61.961524226799995, 160.0, 61.961524226799995, 150.0, 44.6410161512 ),
new CustomHexagon( "13", 220.0, 27.3205080756, 240.0, 27.3205080756, 250.0, 44.6410161512, 240.0, 61.961524226799995, 220.0, 61.961524226799995, 210.0, 44.6410161512 ),
new CustomHexagon( "14", 280.0, 27.3205080756, 300.0, 27.3205080756, 310.0, 44.6410161512, 300.0, 61.961524226799995, 280.0, 61.961524226799995, 270.0, 44.6410161512 ),
new CustomHexagon( "20", 10.0, 44.6410161512, 30.0, 44.6410161512, 40.0, 61.961524226799995, 30.0, 79.2820323024, 10.0, 79.2820323024, 0.0, 61.961524226799995 ),
new CustomHexagon( "21", 70.0, 44.6410161512, 90.0, 44.6410161512, 100.0, 61.961524226799995, 90.0, 79.2820323024, 70.0, 79.2820323024, 60.0, 61.961524226799995 ),
new CustomHexagon( "22", 130.0, 44.6410161512, 150.0, 44.6410161512, 160.0, 61.961524226799995, 150.0, 79.2820323024, 130.0, 79.2820323024, 120.0, 61.961524226799995 ),
new CustomHexagon( "23", 190.0, 44.6410161512, 210.0, 44.6410161512, 220.0, 61.961524226799995, 210.0, 79.2820323024, 190.0, 79.2820323024, 180.0, 61.961524226799995 ),
new CustomHexagon( "24", 250.0, 44.6410161512, 270.0, 44.6410161512, 280.0, 61.961524226799995, 270.0, 79.2820323024, 250.0, 79.2820323024, 240.0, 61.961524226799995 ),
new CustomHexagon( "30", 40.0, 61.961524226799995, 60.0, 61.961524226799995, 70.0, 79.2820323024, 60.0, 96.602540378, 40.0, 96.602540378, 30.0, 79.2820323024 ),
new CustomHexagon( "31", 100.0, 61.961524226799995, 120.0, 61.961524226799995, 130.0, 79.2820323024, 120.0, 96.602540378, 100.0, 96.602540378, 90.0, 79.2820323024 ),
new CustomHexagon( "32", 160.0, 61.961524226799995, 180.0, 61.961524226799995, 190.0, 79.2820323024, 180.0, 96.602540378, 160.0, 96.602540378, 150.0, 79.2820323024 ),
new CustomHexagon( "33", 220.0, 61.961524226799995, 240.0, 61.961524226799995, 250.0, 79.2820323024, 240.0, 96.602540378, 220.0, 96.602540378, 210.0, 79.2820323024 ),
new CustomHexagon( "34", 280.0, 61.961524226799995, 300.0, 61.961524226799995, 310.0, 79.2820323024, 300.0, 96.602540378, 280.0, 96.602540378, 270.0, 79.2820323024 ),
new CustomHexagon( "40", 10.0, 79.2820323024, 30.0, 79.2820323024, 40.0, 96.602540378, 30.0, 113.9230484536, 10.0, 113.9230484536, 0.0, 96.602540378 ),
new CustomHexagon( "41", 70.0, 79.2820323024, 90.0, 79.2820323024, 100.0, 96.602540378, 90.0, 113.9230484536, 70.0, 113.9230484536, 60.0, 96.602540378 ),
new CustomHexagon( "42", 130.0, 79.2820323024, 150.0, 79.2820323024, 160.0, 96.602540378, 150.0, 113.9230484536, 130.0, 113.9230484536, 120.0, 96.602540378 ),
new CustomHexagon( "43", 190.0, 79.2820323024, 210.0, 79.2820323024, 220.0, 96.602540378, 210.0, 113.9230484536, 190.0, 113.9230484536, 180.0, 96.602540378 ),
new CustomHexagon( "44", 250.0, 79.2820323024, 270.0, 79.2820323024, 280.0, 96.602540378, 270.0, 113.9230484536, 250.0, 113.9230484536, 240.0, 96.602540378 )
EventHandler<MouseEvent> mouseClickedHandler = new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent t) {
CustomHexagon h = (CustomHexagon) t.getSource();
System.out.println( h.getOverlayText() );
for ( CustomHexagon hexagon : hexagons ) {
hexagon.setOnMouseClicked( mouseClickedHandler );
root.getChildren().addAll( hexagons );
Scene scene = new Scene(root, 400, 400);
primaryStage.setTitle("Example");
primaryStage.setScene(scene);
primaryStage.show();
public static void main(String[] args) {
launch(args);
After running this program, when one clicks within the intersection of two StackPanes (borders shown by dashed lines), the target of the mouse click event will be the StackPane on top as determined by the order in which they were added to their parent.
This is a problem because there is only a small "T" shaped area within each hexagon that when clicked will target that hexagon with an event, rather than adjacent nodes.
I would appreciate any reccomendations to solve this problem.
Thanks,
James GillerHello, this is an evergreen. Just call setPickOnBounds(false) on the CustomHexagon.
An issue tracking this problem is open here: https://javafx-jira.kenai.com/browse/RT-17024 -
Performance of update query for single column vs multiple column
Hi All,
I could not find any answer for this, does it ever matter in terms of performance updating single column versus multiple column in a single update query.
For eg. table consisting of 15 columns, what would be the difference in performance when one column is update in the single query against another update query where 15 columns are updated.
Please do keep in mind my table columns in actually could be around 150+.
Thanks for any information provided.If updated columns aren´t on where clause , then the only impact of 15 columns will be a increase on redo generation, and a possible chainning row.
So since the redo is one of the things that have a large impact, the answer is yes.
The performance will be slower.
Regards
Helio Dias.
http://heliodias.com
OCE SQL, OCP 9i -
On Click event for button not firing
Hi,
I'm writing a portlet under Plumtree 5.0.2 and using web controls 2.1 (released version).
I have a form that has a text box, a label, and a submit button. By cliking on the button the text from the box should appear in the label. If I run the application outside the portal everything seems to work fine, but on the portal the click event does not fire. why?
I have my ptrender tag on the form, httpmodules in the config file, GetPostBackEventReference on Page_Load. Did I forget something?
any advice is appreciated. Thanks
TaniaTania,
You'll need to add ptrender="true"to the button's opening tag if you want the button's server-side code to execute. Also, you won't need ptrender on the form's opening tag.
From what I can see, placing ptrender on the form's opening tag can be used for two things:(i) when the user clicks a button (which doesn't have ptrender itself) causes the browser to return to the portal, similar to executing portletresponse.ReturnToPortal() in your server-side code.(ii) causing a third-party control to similarly return to the portal as (i) above.
Nick. -
Click event for specific timeline label?
Hello,
I am creating an interactive map: San Diego Gaslamp Interactive Walking Map
...it is still in progress at the moment, so only a few things work.
This question is in regards to the "LODGING/ACCOMMODATIONS" menu on the right hand side.
I am trying to create 2 click events. Click to open and click to close, so I'm wondering if it's possible to do something like this:
if at label 2 sym.stop("label1");
if at label 1 sym.stop("label2");
I'm not sure how to code the "if at label 2" part...or if it's even possible.
Any help would be greatly appreciated!Hi Redesign,
Thanks for the response!
I adjusted your code to my document and added the following to the "lodgingindexbutton", but it doesn't appear to be working:
var MyStop=0;
sym.$('lodgingindexbutton').bind("click",function(){if (MyStop==0){
sym.stop("lodgingstart");
MyStop=1;
} else {
sym.stop("lodgingover");
MyStop=0;
Not sure if I did something wrong?...
If you are up for it, I have attached the original files here:
http://adobe.ly/1vZTtqf
I am trying to add the "2 clicks" code to the "lodgingindexbutton".
You can get to it by double-clicking the Index in the upper right corner.
Then you will see the "lodgingindexbutton" at the top of the index.
As you can see, I currently have it set to just open, then you can close it by clicking the triangle.
This is working and will be fine, but I thought it would be nice to click open and click closed as it seems that what a user would want to do.
Any help would be appreciated. Thanks so much!!
Jason -
Please someone help me in writng selection , click and change events for dropdownlist in flex for mobile applications . i have tried but i wasn't able to select the items in dropdown using my mouse or touch in my mobile . Please help me I am struck at this point and i am unable to get solution gfor this. Please................
Some code for which i neederd help:
<s:DropDownList id="ddlBranch" x="257" y="475" width="63%" height="80%"
creationComplete="ddlBranch_creationCompleteHandler(event)"
fontFamily="Calibri" fontSize="24"
labelField="BranchName"
prompt="{ddlBranch.selectedItem}"
requireSelection="true"
selectionColor="#7ab342">
<s:AsyncListView list="{getBranchResult.lastResult}"/>
</s:DropDownList>
<s:DropDownList id="ddlZone" x="257" y="546" width="63%" height="80%"
creationComplete="ddlZone_creationCompleteHandler(event)"
fontFamily="Calibri" fontSize="24"
labelField="ZoneName"
prompt="{ddlZone.selectedItem}"
requireSelection="true"
selectionColor="#7ab342">
<s:AsyncListView list="{getZoneResult.lastResult}"/>
</s:DropDownList>
I will get the list of Branches(first DDL) and Zones(Second DDL) from a webservice written in DOT(.)NET, what i needded is touch events and selection events for both the dropdown lists and the data in the second DropDown List should bind based on the First Dropdown list item selected.
Service call for binding data to DDL:
protected function ddlBranch_creationCompleteHandler(event:FlexEvent):void
getBranchResult.token = loginService.getBranch();
protected function ddlZone_creationCompleteHandler(event:FlexEvent):void
getZoneResult.token = loginService.getZone();
Please help...
Thank you.Therer are two ways you can assign an action to the "OnEnter"-event of your input field:
1. in method cl_wd_input_field=>new_input_field you have the parameter:
ON_ENTER
You just have to assign your action name to this field and it will be called on the OnEnter-event of your InputField.
e.g:
lr_input_field = cl_wd_input_field=>new_input_field(
id = 'INP_MY_INPUT_FIELD'
on_enter = 'MYACTION'
2. You can use the method SET_ON_ENTER.
like:
lr_input_field->set_on_enter( 'MYACTION' ).
Just make sure, you have created and implemented this action and its handler. -
How to cancel datagrid itemclick event for one column with a button control
I have a datagrid that displays rows of data that can be
edited and deleted. To edit the user clicks on a row and the row
data appears above in some text fields and user can edit data then
clicks save and datagrid is refreshed with updated data. Also on
each row is a delete button. This button will delete the current
row of data. The conflict is when user clicks on the delete button
the itemclick event of row is activated and edit fields get filled
and then data row is deleted. I can create some very inefficient
code around this, but i rather not. What I would like to do is
cancel the itemclick event in the delete button column so the
itemclick event never happens when click on the button. Is this
possible?Just ran across this problem myself. My simple approach is to check the columnIndex in the ListEvent that is passed on itemClick.
-
Double click event for the I/O field in custom screen
Hello all:
I have development a dialog program now, and I want to show the MM03 screen when I double click the I/O field for material number ( such as the CO03 materil field ). I had set the screen display attribute to " Responds to double-cick",but I can't receipt any infor from the PAI Flow but a message "Please choose a valid function".
some friends proposed me to set the Function Code for it , but the FctCode only support for "button" and "tab titles" and "Dropdown box" , how can I do.Hi,
Check ur pf-status. in that did u give PICK to the functionkey F2 which will enable the db click facility.
apart from setting the PF-status with PICK (F2) also set the property "respond to double click" for the tablecontrol column in screen painter.
and u can get the values of the clicked field by GET CURSOR command.
Also you can refer:-
double click from table control?
Doubleclick in Table control
Hope this helps you.
Regards,
Tarun -
Can a program a double click event for a button in Flash Catalyst?
I currently have a button programed in FC with a single click. I would like the exact same behavior to happen whether there is a single or double click on the same button.
Is there a way to do this in FC? If not can I pull it into another program to edit the code?
Thank you!
SarahThanks for letting me know.
Unfortunatly it looks like I can't upgrade unless I upgrade my whole suite, which is a bummer. We just spent a small fortune on upgrading everyone from CS3 - SC5. I will have to check with our account rep, but I doubt I can get another software update approved this year. Maybe next.
Thanks again Chirs! -
Double click event for JTable.....
All,
I would like to display some data on double_click a selected row from the JTable. How do I code the double_click event in the following program. Please advise.
Here is the code:
import javax.swing.*;
import javax.swing.table.*;
import java.awt.*;
import java.awt.event.*;
import java.util.Vector;
class TableTest extends JFrame {
MyTableModel myModel;
JTable table;
JButton button;
JButton buttonQuery;
int count = 0;
public TableTest() {
myModel = new MyTableModel();
table = new JTable(myModel);
table.setPreferredScrollableViewportSize(new Dimension(500, 200));
JScrollPane scrollPane = new JScrollPane(table);
//Add the scroll pane to this window.
getContentPane().add(scrollPane, BorderLayout.CENTER);
getContentPane().add(button = new JButton("Add Row"),
BorderLayout.SOUTH);
getContentPane().add(buttonQuery = new JButton("Query"), BorderLayout.NORTH);
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Object [] aRow = new Object [8];
for (int i=0; i<5; i++) {
aRow = new Integer(count+i);
myModel.addRow(aRow);
count += 10;
buttonQuery.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.out.println(myModel.getRowCount());
System.out.println(myModel.getValueAt(1, 3));
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
class MyTableModel extends AbstractTableModel {
protected final String[] headers =
{ "No", "Vehicle No", "Date of Loss", "Image Type", "Image Description", "Claim Type", "Scan Date", "User Id" };
Vector data;
MyTableModel() {
data = new Vector();
public int getColumnCount() {
return headers.length;
public int getRowCount() {
return data.size();
public Object getValueAt(int row, int col) {
if (row < data.size() && col < 8) {
Object [] aRow = (Object []) data.elementAt(row);
return aRow[col];
} else {
return null;
public void addRow(Object [] aRow) {
data.addElement(aRow);
fireTableRowsInserted(data.size()-1, data.size()-1);
public static void main(String[] args) {
TableTest frame = new TableTest();
frame.pack();
frame.setVisible(true);
}Thanks, but I get 1 error:
'Cannot resolve symbol' -class MouseInputAdapter
import java.awt.event.MouseAdapter;
Also say if I need to get 'column data' from selected
row, what will be the command like ?
int col = table.columnAtPoint(p);>
Best Regards -
Problem in Double click event for ALV.
Hi experts ,
My scenario is one ALV is displayed in First screen and after double click on particular column second screen is displayed with the other ALV.
I have created 2 custom containers.
My problem is that for the first double click every thing is fine,then i come back to first screen from second screen when i double click on different item the previous item is displayed which was for the first double click .
I debugg the program , passing of data to the internal table is fine.
Help me in the problem
Thanks
AisuryaHi,
You have to use refresh_table_dispaly method to update the values. else it will display the same.
try this logic
if cus_cont is initial.
o_grid->set_table_for_first_display.
else.
o_grid->refresh_table_display.
endif.,
check BCALV_GRID_03 standard program for reference.
hope this helps u.,
Thanks & Regards,
Kiran -
Can someone tell me which event is fired when a column is moved (dragging from one location to the next) in a JTable. I need to know when the move ends.
ThanksRTM javax.swing.event.TableColumnModelEvent
-
Hi all,
I need to develop a report with following columns
Category ------ Period
Cash 5000000
Cash opening 100000
Cash closing 20000
When i select Mar-08 as prompt i need to display cash opening as Jan -08 and Cash closing as Dec-08 values.
How can i achieve this.
Guide me regarding this.
ThanksHi run4it,
SharePoint doesn't support the filter control with mulitple checkboxs in list column head in SharePoint 2007, which is supported in SharePoint 2013 as you find, it seems there is no OOB configuration approach (or with SharePoint designer) could achieving
this goal.
I thinks it has to write the custom code to implement filtering the same one column with multiple values or use some third party commercial web parts as Dimitri suggested.
http://www.primordialcode.com/blog/print/wsssharepoint-create-custom-listviewwebpart
Thanks,
Daniel Yang
Forum Support
If you have feedback for TechNet Subscriber Support, contact [email protected]
Daniel Yang
TechNet Community Support -
OBIEE Povit Table View for Single Column
Please any one can help me how to display following records
ectual Records like
1
2
3
4
5
6
7
8
9
10
11
12
13
I want to display as in answer
1 6 11
2 7 12
3 8 13
4 9
5 10
Please help ...Hi ,
refer this :
Re: Pivot Table And Sections - Display horizontally
Maybe you are looking for
-
I have 5 devices authorized to my itunes account. 2 of them crashed long ago. Now that I have a new pc, I am unable to authorize it. I think from what I've read that I should "deauthorize all" and then go back and authorize my current 3 devices. I
-
When I started up my computer and clicked Mozilla Firefox a box popped up asking me if I wanted to use Safe Browser or default browser d14 and some more letters and numbers. I have never been asked this and thought maybe there was a problem so I deci
-
HT4848 How do I get the Recovery Disk Assistant?
Reading 'OS X Lion: About Lion Recovery Disk Assistant' at http://support.apple.com/kb/HT4848?viewlocale=en_US . My 1 day old macbook pro would not let me or root login (after resizing the os partition with diskutil to install fedora linux) and I ne
-
Split 4k monitor into two "virtual monitors"?
Hi all, I'm thinking of buying a 4k monitor to replace a dual-screen setup. However, I like the functionality of having two things maximised at once. Is there any way to set up X so that it sees the 4k 3840x2160 monitor as two separate 1920x2160 moni
-
There's probably a really simple answer to this question, but I can't seem to figure it out. I want to pan my audio gradually from the left to the right. How do I do this? I can only figure out how to permanently put it to the right channel or left,