我想循环遍历 dataGrid 中的所有项目并与特定项目进行比较
我想循环遍历数据网格中的所有项目,并将它们与数据网格本身中存在的特定项目(唯一)进行比较,如果不相等,则该唯一项目(“我的管道” 是该特定项目的名称),我想将其与其余项目进行比较,然后删除该项目并移至下一个项目并再次比较。
intRowCount = Browser("Browser").appliaction("abc").FlexTitleWindow("Views").AdvancedDataGrid(dgView).GetItemsCount
For i=0 to intRowCount
Browser("Browser").appliaction("abc").FlexTitleWindow("Views").AdvancedDataGrid(dgView).SelectIndex i
If Browser("Browser").appliaction("abc").FlexTitleWindow("Views").AdvancedDataGrid(dgView).GetROProperty("SelectedItem") <> Browser("Browser").appliaction("abc").FlexTitleWindow("Views").AdvancedDataGrid(dgView).GetROProperty("My Pipeline") Then
Browser("Browser").appliaction("abc").FlexTitleWindow("Views").FlexButton("Delete View").Click
我想循环遍历,直到删除除默认视图(我的管道)之外的所有其他视图。
请提出一些逻辑。
I want to loop through all the items in the datagrid and compare them with a particular item(unique) present in the datagrid itself, and if it is not equal that unique item ("My Pipeline" is the name of that particular item) with which i want to compare rest of the items with then delete that item and move on to the next item and compare again.
intRowCount = Browser("Browser").appliaction("abc").FlexTitleWindow("Views").AdvancedDataGrid(dgView).GetItemsCount
For i=0 to intRowCount
Browser("Browser").appliaction("abc").FlexTitleWindow("Views").AdvancedDataGrid(dgView).SelectIndex i
If Browser("Browser").appliaction("abc").FlexTitleWindow("Views").AdvancedDataGrid(dgView).GetROProperty("SelectedItem") <> Browser("Browser").appliaction("abc").FlexTitleWindow("Views").AdvancedDataGrid(dgView).GetROProperty("My Pipeline") Then
Browser("Browser").appliaction("abc").FlexTitleWindow("Views").FlexButton("Delete View").Click
I want to loop through until all other views are deleted except my Default view (MY Pipeline).
Please suggest some logic.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是我实现的用于将数据从 DataGrid 下载到 CSV 文件的代码。
这可能对你有用。
请记住 dgSessionReport 是我的数据网格,first_name 和 last_name 是我的数据字段名称。
首先,我创建一个包含 csv 数据的字符串,然后将其写入扩展名为 .csv 的文件中。
您需要做的是在需要编写的第二个 for 循环中
,这是我的代码
}
This is the code that i have implemented to download the data from DataGrid to CSV file.
This may be useful to you.
Remember dgSessionReport is my Datagrid, first_name and last_name is my datafield name.
First I am creating a String that contains csv data and then i am writing that into file having extension .csv
You need to do is in the 2nd for loop you need to write
Here is my code
}