EasyUI Forum
June 16, 2024, 08:57:15 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: textbox setText  (Read 11644 times)
jaimi
Full Member
***
Posts: 119


View Profile
« on: March 16, 2015, 02:33:47 AM »

I created a separate textbox which should relate to a datagrid.

 $('#oNTY_DES').textbox({
   width: 990
  ,height: 300
  ,type: 'text'
  ,multiline: true
  ,editable: false
  ,readonly: true
  ,iconWidth:0
  ,prompt: 'Beschreibung...'
 });

whenever a row within the datagrid is selected, the value of the row should appear in the textbox. I Tried this:

...
 ,onSelect:function(index,row){
   var row = $('#edgFutter').datagrid('getSelected');
    if (row){
     alert('Item ID:'+row.OLT33A003T_KEY+"\nPrice:"+row.NTY_TYPE);
    $('#oNTY_DES').val(row.OLT33A003T_KEY);
   }
  }
 });//edatagrid

the alert works but not nothing appears in the textbox.

thx for help.
Jaimi
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: March 16, 2015, 08:08:10 AM »

Please call the textbox's 'setValue' method to set its value.
Code:
$('#oNTY_DES').textbox('setValue',row.OLT33A003T_KEY);
Logged
jaimi
Full Member
***
Posts: 119


View Profile
« Reply #2 on: March 17, 2015, 12:01:25 AM »

thx
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!