【问题标题】:Clear content of view in TitaniumTitanium 中清晰的视图内容
【发布时间】:2013-10-29 21:19:07
【问题描述】:

我有一个包含 tableview 的视图,其中包含从 web 加载的数据,即各个地方,在另一个 topview 中,我有一个数据选择对话框,可以设置半径为 km。因此,在更改值时,我想清除 tableview 中的数据并根据用户选择的半径加载新数据

【问题讨论】:

    标签: android titanium appcelerator titanium-mobile


    【解决方案1】:

    您应该能够创建一个空数组来清除数据,并将其设置为您的新数据数组。比如:

    tableview.data = []; // Clears the array
    tableview.data = [newArray]; // Sets the new data
    

    【讨论】:

    • 感谢您的宝贵回复。我没有尝试过你的答案,但下面的代码对我很有效。 tablearray=[];//clears the array
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-11-01
    • 2011-04-17
    • 1970-01-01
    • 2018-02-25
    • 1970-01-01
    • 2023-02-25
    相关资源
    最近更新 更多