gwt celltable - Selecting text in TextinputCell in GWT -
I use a TextInputCell in a CellTable when I click on a cell, then I would like to select the text . I do not want it to be an EditTextCell
Do you have any ideas?
You can try the following approach:
myTable AddCellPreviewHandler (new handler & lt; MyObject & gt; () {@Override CellProvision on Public Zero (MyObject & Event; Event) {if ("click" equals (event.getNativeEvent (.) GetType ()) ) {If event.getColumn () == table.getColumnIndex (myColumn)) {InputElement Input = (InputElement) getRowElement (event.getIndex ()). GetCells () GetItem (event.getColumn ()). GetFirstChildElement () GetFirstChildElement (); Input.select ();}}}});
Comments
Post a Comment