EasyUI Forum
May 02, 2024, 12:06:11 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: Add 2 combobox in one datagrid column  (Read 4438 times)
kashumaraz
Newbie
*
Posts: 1


View Profile Email
« on: August 07, 2016, 11:12:31 AM »

Hello I would like to know if it is possible to add  two combobox having two different value set in a single column of a datagrid.
Logged
frankgao
Jr. Member
**
Posts: 53


View Profile Email
« Reply #1 on: August 10, 2016, 01:55:15 AM »

I think it's no problem.
The column you can use the formatter attributes.
Like the bottom codes,You can use the value and set the html element.
this is just a sample, you can use the same method get it.

Code:
                    { field: 'views', title: 'View', width: 50,
                        formatter: function (value, rec, rowIndex) {
                            if(value=='1'){
                                return "<input type=\"checkbox\" id=\"gpcheckboxd"+rec.id+"\"  name=\"gpcheckboxd"+rec.id+"\" onclick=\"checkboxListener("+rec.id+",'gp')\" value='"+value+"' checked='true'>";
                            }
                            else{
                                return "<input type=\"checkbox\" id=\"gpcheckboxd"+rec.id+"\"  name=\"gpcheckboxd"+rec.id+"\" onclick=\"checkboxListener("+rec.id+",'gp')\" value='"+value+"'>";
                            }
                        } }
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!