Show Posts
|
Pages: [1] 2 3 ... 5
|
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.
|
|
|
5
|
General Category / Bug Report / Re: deleteRow causes expand problems
|
on: October 30, 2013, 02:48:55 PM
|
My workaround for that example: 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: $('#dg').datagrid('deleteRow', 0)
Now click to expand the first row. You get a blank line. The problem is that onExpandRow looks like this: 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.
|
|
|
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: 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?
|
|
|
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?
|
|
|
|