EasyUI Forum
April 18, 2021, 01:27:32 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / General Discussion / Re: EasyUI datagrid in iFrame can't display records in first click loading or IE on: January 20, 2021, 04:20:17 PM
For anyone who stumbles upon this post (as I did).  I had a very similar problem recently; an accordion where each panel linked to a page containing a datagrid.  When expanding any accordion panel in IE the panel would be blank.  Collapsing then re-expanding the panel and the datagrid would be displayed.  This only happened for IE.  Edge, Chrome, Firefox and Safari all worked fine; i.e. the grid would be displayed the first time the panel was expanded.

My solution was to hook into the panels onLoad() event and call the panels resize() method.  This seems to trigger the redraw of the panel and thus shows the grid (NB I tried refresh() but this did not work).  Also the onLoad() event only gets called once (per panel), not every time I expand it.  There does not appear to be any adverse affects in the other browsers.

function fixForIE(id) {
  $('#aa').accordion('getPanel', id - 1).panel('resize');

$(document).ready(function () {

  for (var group in productGroups) {

    var p = $('#aa').accordion('add', {
      title: group + '<span style=\'float:right;margin-right:10px;\'>' + productGroups[group].length + '</span>',
      content: '<div style="padding:10px"></div>',
      selected: false

    $('#aa').accordion('getPanel', $('#aa').accordion('panels').length - 1).panel({
      id: $('#aa').accordion('panels').length,
      href: 'Products?index=' + ($('#aa').accordion('panels').length - 1),
      onLoad: function () { fixForIE(parseInt(this.id)); }



I am using jQuery 3.5.1 and jQuery EasyUI 1.9.7
2  General Category / EasyUI for jQuery / Re: TreeGrid Merge / Span Columns on: May 03, 2018, 07:25:52 PM
That works perfectly stworthy, thank you  Smiley
3  General Category / EasyUI for jQuery / Re: TreeGrid Merge / Span Columns on: May 02, 2018, 08:06:56 PM
Thanks jarry.  That works well until the text is longer as it doesn't wrap - see attached Sad

I've been looking at manipulating the DOM after load with some success; I add a known css class to the elements I want to span, then after load look for that class and perform the manipulation:

function colspanFormatter(cssClass, cols) {
    $('.' + cssClass).closest('tr').each(function() {
        for (var c = cols - 1; c > 0; c--) {
        $(this).children('td').eq(0).attr('colspan', cols.toString());
    onLoadSuccess: function (row, data) { colspanFormatter('colspan3', 3); }

see demo: http://code.reloado.com/efobob4/edit#preview

This wraps nicely Smiley
But doesn't align very well on at the left Sad
4  General Category / EasyUI for jQuery / TreeGrid Merge / Span Columns on: April 30, 2018, 09:35:05 PM
Is it possible to to have a cell span columns in the TreeGrid?  e.g. the long folder name in the screenshot attached.

NB  I tried adapting the process described for DataGrid cell merging cells here: https://www.jeasyui.com/tutorial/datagrid/datagrid13.php

e.g. ... onLoadSuccess: function (row, data) {$('#tt').treegrid('mergeCells', { index: 2, field: 'name', colspan: 3 }); }

But no joy.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!