Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to Get Textfield from Grid in GWT EXT
    primarykey
    data
    text
    <p>I have one one Grid which contain 4 column and somewhere column contain TextField and somewhere ComboBox, I achieved this by calling renderer for particular ColumnConfig. Each row is haveing one button with name "Save".</p> <p>User can even make the changes to the content of textField and I want that textField content now, how to get it.</p> <p>I am not able to get the <img src="https://i.stack.imgur.com/ggRo7.png" alt="enter image description here">textfield itself. When I try to get the textfield using store.getAt(0), at that time it gives me the content of TextField which was initially and not one which user modified now.</p> <p>Server Code</p> <pre><code> List&lt;AccountResult&gt; results = new ArrayList&lt;AccountResult&gt;(); for (int i = 0; i &lt; listAccounts.size(); i++) { Account account = listAccounts.get(i); AccountResult accountResult=new AccountResult(); accountResult.setActionId(account.getId()); accountResult.setAccountName(account.getAccountName()); accountResult.setEmailId(account.getAccountEmail()); accountResult.setMobileNo(account.getAccountcontactNum()); accountResult.setAccountDescription(account.getAccountDesc()); results.add(accountResult); } </code></pre> <p>Client code</p> <pre><code>ListStore&lt;AccountResult&gt; store = new ListStore&lt;AccountResult&gt;(); store.add(response.getAccountDetails()); List&lt;ColumnConfig&gt; configs = new ArrayList&lt;ColumnConfig&gt;(); ColumnConfig accountNameColumn = new ColumnConfig(); accountNameColumn.setId(AccountResult.ACCOUNT_NAME); accountNameColumn.setHeader(Constants.VA_ACCOUNT_NAME); accountNameColumn.setWidth(110); accountNameColumn.setRenderer(getTextAndViewRenderer()); configs.add(accountNameColumn); </code></pre> <p>In getTextAndViewRenderer() function</p> <pre><code>accountNameTextField = getTextField(null, data, 80, Constants.VA_ACCOUNT_NAME_ID+rowIndex, Constants.VA_ACCOUNT_NAME_ID, false, false); hp.add(accountNameTextField); </code></pre> <p>In My handleEvent for Button what should I write to get the TextField or content of it</p> <pre><code>private Listener&lt;ButtonEvent&gt; getActionListener(final Action action, final AccountResult result, final ListStore&lt;AccountResult&gt; store, final Grid&lt;AccountResult&gt; grid, final String property,final ColumnData config, final int rowIndex) { return new Listener&lt;ButtonEvent&gt;() { public void handleEvent(ButtonEvent be) { } }; } </code></pre> <p>Please help me .....Thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload