EasyUI Forum
May 20, 2024, 02:52:37 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: strange gap between headers and first row  (Read 10498 times)
iceh
Jr. Member
**
Posts: 61


View Profile
« on: November 24, 2013, 08:20:17 AM »

I have a very simple hello world like example for a datagrid:

Code:
<table id="dg2"></table>
<script type="text/javascript">
    $('#dg2').ready(function () {
        $('#dg2').datagrid({
            fit: true,
            fitColumns: true,
            singleSelect: true,
            columns: [[
                { field: 'AccountID', hidden: true },
                { field: 'code', title:'Code', width:100, fixed:true },
                { field: 'name', title: 'Name', width: 100, fixed: true },
                { field: 'price', title: 'Price', width: 100, align: 'right', fixed: true },
                { field: 'padding', width: 100, fixed: false }
            ]],
            data: [
        { code: 'value11', name: 'value12', price: 'value13' },
           
        { code: 'value21', name: 'value22', price: 'value23' },
        ]
        });
    });
</script>

I have some nested layouts and inside a center there is a panel.
The datagrid get's loaded in the panel by ajax by a user event.


I get a very strage gap between the first row and the headers.


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


View Profile Email
« Reply #1 on: November 24, 2013, 01:32:48 PM »

Please provide your nested layout code. This will be helpful to find out the problem.
Logged
iceh
Jr. Member
**
Posts: 61


View Profile
« Reply #2 on: November 24, 2013, 03:47:30 PM »

Hey stworthy,

thx - I'll provide a demo page.
Logged
iceh
Jr. Member
**
Posts: 61


View Profile
« Reply #3 on: November 25, 2013, 03:41:30 AM »

jEasyUI = Easy fix!

Microsoft in their great wisdom decided to setup a default CSS file for ASP.Net MVC projects.

This caused the strange gap.
Logged
DN
Newbie
*
Posts: 6


View Profile
« Reply #4 on: January 20, 2014, 10:11:29 AM »


So, is there a way to remove the MS' CSS reference?  How did you fix the problem?

I have the same issue with accordion.  All <div> inside a accordion are separated by a gap.
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!