EasyUI Forum
September 16, 2025, 10:51:23 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: datagrid inline non-ajax combobox editor [solved]  (Read 9524 times)
devnull
Sr. Member
****
Posts: 431


View Profile
« on: February 27, 2013, 07:19:48 PM »

I need to add an inline combobox editor into a datagrid, I have googled and searched this forum trying to find the correct syntax but can't seem to crack it.

I know how to add a ajax combobox, but how to add it when the data is hard coded in the object:

Code:
{field:'status',title:'Won/Lost',editor:'combobox',data:[{txt:'Won',val:'won'},{txt:'Lost',val:'lost'}]}

I have tried several variations of this but can't get it to work ??

Thanks
« Last Edit: March 01, 2013, 03:07:37 AM by devnull » Logged

-- Licensed User --
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: February 27, 2013, 11:17:18 PM »

Try the code below:
Code:
{field:'status',title:'Won/Lost',
editor:{
type:'combobox',
options:{
valueField:'val',
textField:'txt',
data:[{txt:'Won',val:'won'},{txt:'Lost',val:'lost'}]
}
}
}
Logged
devnull
Sr. Member
****
Posts: 431


View Profile
« Reply #2 on: February 28, 2013, 12:08:27 AM »

Edit
===

Yes, that works, thanks
« Last Edit: February 28, 2013, 12:23:12 AM by devnull » Logged

-- Licensed User --
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!