EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Ellipsis on June 13, 2012, 09:40:24 AM



Title: Datagrid not Showing
Post by: Ellipsis 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


Title: Re: Datagrid not Showing
Post by: stworthy 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.


Title: Re: Datagrid not Showing
Post by: Ellipsis 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


Title: Re: Datagrid not Showing
Post by: stworthy 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/


Title: Re: Datagrid not Showing
Post by: Ellipsis on June 14, 2012, 10:05:59 AM
Thank you so much!  ;D

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.   :'( :'(

Update:: Fixed, I didn't update all easyui files....  ::)