Hi All,
I'm setting an Editor Type for a certain column in a list grid. The custom editor is defined (for illustration) like this:
And is used like this:
So for that specific column, the editor for each record will be the TriggerField. So whenever the icon for the TriggerField is clicked, the onIconClick event handler will be invoked. But how do I know which record was clicked? I need to be able to have a different implementation for each record.
I've been looking through the IconClickEvent object but I can't determine which record the editor was in.
Any help/clues would be greatly appreciated....
Kind Regards,
Ben
I'm setting an Editor Type for a certain column in a list grid. The custom editor is defined (for illustration) like this:
Code:
import com.smartgwt.client.widgets.form.fields.TextItem; import com.smartgwt.client.widgets.form.fields.events.IconClickEvent; import com.smartgwt.client.widgets.form.fields.events.IconClickHandler; public class TriggerField extends TextItem { public TriggerField() { ... //Setup the icon here ... addIconClickHandler(new IconClickHandler() { public void onIconClick(IconClickEvent event) { } } } }
Code:
ListGrid listGrid = new ListGrid(); ListGridField newCol = new ListGridField("name", "Name"); newCol.setEditorType(new TriggerField()); ...
I've been looking through the IconClickEvent object but I can't determine which record the editor was in.
Any help/clues would be greatly appreciated....
Kind Regards,
Ben
Comment