EasyUI Forum
May 07, 2024, 06:42:28 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1] 2 3 ... 5
1  General Category / General Discussion / Re: suggestion: hideTools method for tabs on: May 26, 2015, 06:45:15 AM
Thanks!
2  General Category / Bug Report / Re: formatter in datagrid has bug in 1.4.2 on: May 19, 2015, 07:31:42 AM
We just upgraded to 1.4.2 and I ran into this feature as well. What's the purpose of renderEmptyRow and will overriding it thwart it? Will there be any bad side-effects. I guess I'm just not understanding this bit of code change since it causes invalid data to be fed to the formatter function.
3  General Category / General Discussion / suggestion: hideTools method for tabs on: May 19, 2015, 07:21:54 AM
Much like showHeader/hideHeader, it'd be handy to have a showTools/hideTools method for tabs. Right now I'm using $(tools_menu_id).hide(). That's fine, but I feel like it'd be a bit cleaner/more generic the other way.
4  General Category / EasyUI for jQuery / set menu to hidden by default on: April 17, 2015, 01:15:59 PM
1.4 introduced hideItem to menus. Is there a data-option to set start the item out hidden to begin with?
5  General Category / Bug Report / Re: deleteRow causes expand problems on: October 30, 2013, 02:48:55 PM
My workaround for that example:

Code:
onExpandRow: function(index,row){
    //$('#ddv-'+index).panel({
    $(this).datagrid('getRowDetail', index).panel({
        height:80,
        border:false,
        cache:false,
        href:'datagrid21_getdetail.php?itemid='+row.itemid,
        onLoad:function(){
            $('#dg').datagrid('fixDetailRowHeight',index);
        }
}

Maybe not using getRowDetail was an oversight in that example.  But I've either followed that example or code posted here for implementing my detail, and it didn't use getRowDetail.  Seems like a good time to update the example.
6  General Category / Bug Report / deleteRow causes expand problems on: October 30, 2013, 02:11:41 PM
Bit of a logic bug in the way the master-detail stuff is implemented.  

Go to
http://www.jeasyui.com/demo/main/index.php?plugin=DataGrid&theme=default&dir=ltr&pitem=
and click on the Master Detail example.  then in the console, issue:
Code:
$('#dg').datagrid('deleteRow', 0)
Now click to expand the first row.  You get a blank line.

The problem is that onExpandRow looks like this:
Code:
onExpandRow: function(index,row){
    $('#ddv-'+index).panel({

Meaning it always fetches the element with the id ddv-0 for the first row.  But when you call deleteRow, it removes the row as well as the ddv-0 item that goes with it.  It then never changes the rest of the rows so that now the row indexes don't match what the detail row placeholder ids.
7  General Category / EasyUI for jQuery / Re: get row value from datagrid formatter on: October 24, 2013, 02:35:13 PM
Just to make sure - did you figure out a solution to your problem?  Smiley
8  General Category / EasyUI for jQuery / Re: get row value from datagrid formatter on: October 21, 2013, 07:56:41 AM
What do you mean "its value"?  The "row" parameter that is passed into it is the record for that row.  So if you can access the values of various columns as row.column1, row.column2, etc.
9  General Category / EasyUI for jQuery / Re: programmatically moving grid columns on: October 21, 2013, 07:54:58 AM
Worked great, thanks!
10  General Category / Bug Report / Re: calling datagrid refreshRow on expanded row causes row to disappear on: October 11, 2013, 07:10:24 AM
Thanks.  That's basically the same code as mine, just with some of the redundant stuff taken out, right?

Is there any reason this shouldn't be part of the core?  I'm still not sure if I understand why you earler said it couldn't/shouldn't be.
11  General Category / Bug Report / Re: calling datagrid refreshRow on expanded row causes row to disappear on: October 10, 2013, 08:11:23 AM
Well, you'd certainly know more about it than me, so what I'm doing may have some bad side-effects.  But this seems effective:
Code:
var detailview2 = $.extend({}, detailview, {
    updateRow:function (target, rowIndex, row) {
        var dc = $.data(target, 'datagrid').dc;
        var opts = $.data(target, 'datagrid').options;
        var cls = $(target).datagrid('getExpander', rowIndex).attr('class');
        $.fn.datagrid.defaults.view.updateRow.call(this, target, rowIndex, row);
        $(target).datagrid('getExpander', rowIndex).attr('class', cls);

        // update the detail content
        if (this.canUpdateDetail) {
            var row = $(target).datagrid('getRows')[rowIndex];
            var detail = $(target).datagrid('getRowDetail', rowIndex);
            detail.html(opts.detailFormatter.call(target, rowIndex, row));

            if (opts.onExpandRow) {
                opts.onExpandRow.call(this, rowIndex, row);
            }
        }
    }
});

Is there something wrong with this that I'm not noticing?
12  General Category / Bug Report / Re: calling datagrid refreshRow on expanded row causes row to disappear on: October 09, 2013, 07:55:00 AM
Thanks.  But upon refreshRow, couldn't you have all expanded rows call onExpandRow again?
13  General Category / EasyUI for jQuery / programmatically moving grid columns on: October 08, 2013, 03:29:49 PM
I know gui drag/drop would be a pain to implement and don't expect it to happen anytime soon.  Alternatively, I want to offer my users a choice on a header popup menu that says "move field left" (or right).  To do that, all I need to do is rearrange the grid's columns and get it to redraw the grid.  I can sort of do that, in that I can rearrange the columns and assign them back to the grid's options.  But the only thing I can find to call is a full grid reload via elem.datagrid(), which unfortunately also re-requests the data from the server.

Is there some function I can use to tell it to just redraw the grid?
14  General Category / Bug Report / calling datagrid refreshRow on expanded row causes row to disappear on: October 08, 2013, 02:08:22 PM
When refreshRow is called on an exanded master-detail grid row, the row content disappears. To reproduce, go to http://www.jeasyui.com/demo/main/index.php?plugin=DataGrid&theme=default&dir=ltr&pitem= and click on the Master Detail grid.  Expand the first item, then enter the following in the javascript console:
Code:
$('#dg').datagrid('refreshRow', 0);
15  General Category / EasyUI for jQuery / Re: how do you add a menu separator programmtically via appendItem? on: October 03, 2013, 08:52:01 AM
Works great, thanks!
Pages: [1] 2 3 ... 5
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!