EasyUI Forum
September 14, 2025, 01:14:18 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: how to make panelWdith combogrid same with textfield width  (Read 12457 times)
Opan Mustopah
Full Member
***
Posts: 164


Indonesia


View Profile Email
« on: January 13, 2015, 07:46:38 AM »

night all,
oke the title say's all.

how to make it happen? in case i have set my textfield width with percentage like 100% or it mean textfield width is following parent element width?

many thanks for the answer
 
Logged

-- Bajak Otak --
*** Sorry for my bad english :3 ***
--JeasyUI version 1.4--
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: January 13, 2015, 08:31:36 AM »

Just set the 'panelWidth' property to 'auto'.
Code:
$('#cg').combogrid({
  panelWidth:'auto'
});
Logged
Opan Mustopah
Full Member
***
Posts: 164


Indonesia


View Profile Email
« Reply #2 on: January 13, 2015, 08:44:01 AM »

thanks stworthy for quick replay,
i'll try it soon.
Logged

-- Bajak Otak --
*** Sorry for my bad english :3 ***
--JeasyUI version 1.4--
Opan Mustopah
Full Member
***
Posts: 164


Indonesia


View Profile Email
« Reply #3 on: January 13, 2015, 08:02:47 PM »

sorry stworthy, but it isn't working with me,,

see bug panelwidth.png:

as you can see , panel combogrid just shown as straight line, when i set panelWidth with 'auto'.
as my code below:

Code:
tipPosition:'top',
            url:'#{lookup_menu_path}',
            mode:'remote',
            method:'get',
            fitColumns:true,
            panelWidth:'auto',
            textField:'namamenu',
            idField:'id_menu',
            onShowPanel:function(){return rowHeight(this);},
            columns:[[{field:'namamenu',title:'Title', width:100,sortable:true}]]

many thanks for the answer
Logged

-- Bajak Otak --
*** Sorry for my bad english :3 ***
--JeasyUI version 1.4--
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #4 on: January 14, 2015, 12:18:15 AM »

Please refer to this example http://jsfiddle.net/rbsb79t2/. It works fine.
Logged
Opan Mustopah
Full Member
***
Posts: 164


Indonesia


View Profile Email
« Reply #5 on: January 14, 2015, 08:41:39 AM »

yes it works fine when you set width element with fixed size, but when you set width element with  percentag like 100%, 80%, it only show the straight line,

see your jsfiddle, i do some modification.
http://jsfiddle.net/rbsb79t2/1/

i change width in originally form you is 350, to 100%.
Logged

-- Bajak Otak --
*** Sorry for my bad english :3 ***
--JeasyUI version 1.4--
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #6 on: January 14, 2015, 07:54:31 PM »

Please try the updated example http://jsfiddle.net/rbsb79t2/2/
Logged
Opan Mustopah
Full Member
***
Posts: 164


Indonesia


View Profile Email
« Reply #7 on: January 14, 2015, 09:37:57 PM »

now it works Cheesy
thanks stowrthy.

but can you help me with this, http://www.jeasyui.com/forum/index.php?topic=4367.msg10485#msg10485

i still have a problem.
Logged

-- Bajak Otak --
*** Sorry for my bad english :3 ***
--JeasyUI version 1.4--
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!