EasyUI Forum
May 13, 2024, 03:41:14 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Combobox method to get record?  (Read 7212 times)
hahamed
Newbie
*
Posts: 13


View Profile
« on: September 14, 2016, 12:04:22 AM »

Hello
I want to get record of selected item with method.
The record is a json object of item.
How? thanks
Logged
jarry
Administrator
Hero Member
*****
Posts: 2264


View Profile Email
« Reply #1 on: September 14, 2016, 07:27:05 PM »

Please try this code:
Code:
var cc = $('#cc');
var value = cc.combobox('getValue');
var item = $.grep(cc.combobox('getData'), function(row){
if (row.value == value){
return true;
} else {
return false;
}
});
console.log(item);
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!