更新TreeTable之后的错误 [英] Bug after update TreeTable

查看:136
本文介绍了更新TreeTable之后的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新TreeTable后出现问题,据我了解,这是因为未刷新模型,试图刷新它但无济于事. 这是我在更新后看到的内容:(我自己删除了标题)

未添加任何行,但是如果我水平滚动,则会添加并查看行.

这是我的更新代码:

if (events) {
                tEvents.unbindAggregation("rows");
                tEvents.bindAggregation("rows",{
                    path: "events>/prg_years(ID_SCENARIO=" + filterKRVR.scenario + ",I_YEAR=" + filterKRVR.year + "m)" + "/HisGTO",
                    parameters: {
                        navigation: {
                            'prg_gto':  "HisPIPE",
                            'prg_pipe': "HisKS",
                            'prg_ks':   "HisLK"
                        },
                    }
                }); 
            }
            tEvents.getModel('events').refresh();

我做错了什么!!

顺便说一句,仅当我在树表中打开最低的行时才出现错误,如果我打开最高的行就可以了,就没有错误了.

谢谢大家的帮助!

解决方案

我创建了滚动水平和垂直滚动的新函数,并在每次汇总或更新行后刷新表

doRefresh: function(){
        $('.sapUiScrollBar div').scrollLeft(100);
        $('.sapUiScrollBar div').scrollLeft(0);
        $('.sapUiScrollBar div').scrollTop(100);
        $('.sapUiScrollBar div').scrollTop(0);
    },

并在此处使用它:更新完成后的触发功能

I got a problem after updating the a TreeTable, as i understand this is because model is not refreshed, tried to refresh it but it doesnt help. Here is what i see after update: (erased headers by myself)

No rows added, but if i scroll horizontally, the rows are added and seen.

Here is my update code:

if (events) {
                tEvents.unbindAggregation("rows");
                tEvents.bindAggregation("rows",{
                    path: "events>/prg_years(ID_SCENARIO=" + filterKRVR.scenario + ",I_YEAR=" + filterKRVR.year + "m)" + "/HisGTO",
                    parameters: {
                        navigation: {
                            'prg_gto':  "HisPIPE",
                            'prg_pipe': "HisKS",
                            'prg_ks':   "HisLK"
                        },
                    }
                }); 
            }
            tEvents.getModel('events').refresh();

What im doing wrong?!

Btw, the bug appers only if im opening in tree table the lowest rows, if i open the heightest rows its ok, no bug.

Thank you all for the help!

解决方案

i created the new function that scroll the horizontal and vertical scrolls, and refreshed the table after each aggregation or update of rows

doRefresh: function(){
        $('.sapUiScrollBar div').scrollLeft(100);
        $('.sapUiScrollBar div').scrollLeft(0);
        $('.sapUiScrollBar div').scrollTop(100);
        $('.sapUiScrollBar div').scrollTop(0);
    },

and used it like here: Trigger function after update complete

这篇关于更新TreeTable之后的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆