Online Forums
Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.
Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.
Do not use the Contact page for technical issues.
- Forum
- Discussions
- QuickOPC-Classic in .NET
- Browsing, Browse Dialogs and Controls
- Can we use the Tag Item browsing dialog to select more than one item?
Can we use the Tag Item browsing dialog to select more than one item?
The reason the dialog is designed in this way is because the user may select items from different branches in the tree, and it would be impossible for him to keep track of what has been selected and there, if the items were just marked at their normal position.
Best regards
Please Log in or Create an account to join the conversation.
Regards,
Michael
Please Log in or Create an account to join the conversation.
Form1.DaItemDialog1.NodeDescriptors contains node descriptors of all selected items. In this sense, the code is OK, even though I do not know what you do further with the 'values' variable. You should probably go through its elements, and process them somehow. Each descriptor contains an ItemID.
TagName = Form1.DaItemDialog1.NodeElement.ItemId will only work if the user has selected precisely one item. In all other cases, you would be dereferencing a null. With MultiSelect = true, you'd rather use NodeElements (and NodeDescriptors), and not NodeElement/NodeDescriptor.
Ad 2.
There is no way to suppress the warning. But, are you saying that you have moved some items into the bottom area of the dialog (which is what only makes them selected), and you *still* get this warning?
Regards
Please Log in or Create an account to join the conversation.
1. See below the entire code:
Public Function GlobalTagBrowse(MyServer As String) As String
Dim easyDAClient = New EasyDAClient()
Dim values() As DANodeDescriptor
Form1.DaItemDialog1.ServerDescriptor.MachineName = server_properties.server_comp_name
Form1.DaItemDialog1.ServerDescriptor.ServerClass = server_properties.RealServerName
Form1.DaItemDialog1.MultiSelect = True
If Form1.DaItemDialog1.ShowDialog() = DialogResult.OK Then
values = Form1.DaItemDialog1.NodeDescriptors
TagName = Form1.DaItemDialog1.NodeElement.ItemId
End If
...
End Function
2.Regarding the warning message, it is displayed when I click on the OK button. Is there a way to prevent this message?
Thank you.
Michael
Please Log in or Create an account to join the conversation.
Regarding the warning message, the actual selection is done by the buttons in the middle of the dialog - they move the currently focused items into the selected list, or remove them again.
Regards
Please Log in or Create an account to join the conversation.
"No Node is selected. Are you sure you want to close the form?"
Thank you.
Michael
Please Log in or Create an account to join the conversation.
Thank you for your answer. Is the code below correct? Should I get the output in the values variable?
Thanks.
Michael
Dim values() As DANodeDescriptor
Form1.DaItemDialog1.MultiSelect = True
values = Form1.DaItemDialog1.NodeDescriptors
Please Log in or Create an account to join the conversation.
Quote:
Best regardsOn the output, the dialog fills the information about selected nodes into the NodeElements property (and updates the NodeDescriptors property as well).
Please Log in or Create an account to join the conversation.
Can we use the Tag Item browsing dialog to select more than one item?
Should we set the following property to True before we call DaItemDialog1.ShowDialog()?
DaItemDialog1.MultiSelect = True
If yes, how can we retrieve all the selected item names?
Thank you.
Michael
Please Log in or Create an account to join the conversation.
- Forum
- Discussions
- QuickOPC-Classic in .NET
- Browsing, Browse Dialogs and Controls
- Can we use the Tag Item browsing dialog to select more than one item?