EasyUI Forum
May 20, 2024, 07:28:12 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 not Showing  (Read 15182 times)
Ellipsis
Full Member
***
Posts: 113


View Profile WWW
« on: June 13, 2012, 09:40:24 AM »

When I use the following datagrid function:

Code:
$(function(){
$('#cc').combogrid({
mode: 'remote',
//hasDownArrow: false,
                width: 200,
panelWidth: 400,
fitColumns: true,
idField: 'geonameId',
textField: 'adminName1',
columns: [[
{field:'name',title:'Name',width:80},
{field:'adminName1',title:'adminName1',width:180},
{field:'countryName',title:'countryName',width:180}
]],
onBeforeLoad: function(param){
if (!param.q || param.q.length<2) return false;
},
loader: function(param,success,error){
$.ajax({
url: 'http://ws.geonames.org/searchJSON',
dataType: 'jsonp',
data: {
featureClass: 'P',
style: 'full',
maxRows: 12,
name_startsWith: param.q
},
success: function(data){
success(data.geonames);
},
error: function(){
error.apply(this, arguments);
}
});
}
});
});


In a html file which also uses the Blueprint CSS layout framework, the inline style element of the class datagrid-view-2 doesn't go to 0px but seems to be stuck on 10000px.....
I use the Blueprint Framework in a lot of situations, I can't seem the find the conflict here though...

please help
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: June 13, 2012, 05:43:03 PM »

The demo below running fine in all major browsers.
http://jsfiddle.net/uzyys/

How do you use the blueprint, a demo link or an attached file can describe this issue in more details.
Logged
Ellipsis
Full Member
***
Posts: 113


View Profile WWW
« Reply #2 on: June 14, 2012, 12:20:57 AM »

Hello,

I updated the demo:

http://jsfiddle.net/uzyys/1/

For future plans I'm planning to use bootstrap (http://twitter.github.com/bootstrap) I do hope this will not conflict with easyUI.

I Think this issue is the same as http://www.jeasyui.com/forum/index.php?topic=427.0
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: June 14, 2012, 05:26:37 AM »

Blueprint override some css rules of easyui. Try below CSS code to fix your combogrid issue:
Code:
		input.combo-text{
margin:0;
border:0;
}
.datagrid table,.datagrid td{
width:auto;
margin:0;
padding:0;
}
div.datagrid-body tbody td{
background:#fff;
}
div.datagrid-body tbody tr.datagrid-row-selected td{
background:#FBEC88;
}
div.datagrid-body tbody tr.datagrid-row-over td{
background:#E0ECFF;
}

The demo page is updated as http://jsfiddle.net/uzyys/2/
Logged
Ellipsis
Full Member
***
Posts: 113


View Profile WWW
« Reply #4 on: June 14, 2012, 10:05:59 AM »

Thank you so much!  Grin

Sadly it's not related to the not firing of the loader part of the same code in an other project of mine, I'll take a better look at that.   Cry Cry

Update:: Fixed, I didn't update all easyui files....  Roll Eyes
« Last Edit: July 10, 2012, 06:33:09 AM by reno1979 » 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!