on 02-23-2006 5:49 AM
Hi all,
Is there any way to know which column is selected when i click on particular record n the table. There is a parameter as column ID for the action mappingOfOnLeadSelect() method, but how to use it?
Regards,
Jaydeep
Hi,
in wdDOModifyView
if(firstTime){
IWDTable t = (IWDTable)view.getElement("Table1");
t.mappingOfOnLeadSelect().addSourceMapping("col","col");
}
And in the action mapped to lead select... create a parameter.. "col".
IN your code if you access this parameter it will contain the value of the selected column.
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
See the Javadoc for method mappingOfOnLeadSelect():
Returns the parameter mapping for event onLeadSelect.
To access UI element event parameters in the attached action handler, an event parameter mapping has to be defined.
Add code like the following inside the view controller method wdDoModifyView():
if (firstTime)
{
IWDTable element = (IWDTable) view.getElement("<ID of Table>");
element.mappingOfOnLeadSelect().addSourceMapping
(
"col", // name of UI element event parameter
"<action handler parameter>" // an action handler parameter of type String
);
element.mappingOfOnLeadSelect().addSourceMapping
(
"row", // name of UI element event parameter
"<action handler parameter>" // an action handler parameter of type int
);
}
Parameters of event onLeadSelect:
String col - The ID of the selected column.
int row - The zero based index of the selected row.
Returns:
the parameter mapping for event onLeadSelect
See Also:
getOnLeadSelect()
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Armin,
The problem that I am facing with this solution is the following:
1. select a column in the table -> you can find the column and row values.
2. select another column in the same row from before -> becuase the lead slection was not changes, the LeadSelect action is not catched and I can not figure out the column ID.
Any suggestions?
Thank,
Aviad
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.