DEV control, PopupContainerEdit, PopupContainerControl, TreeList, pop-up control problem, treelistcontrol
Function Description
PopupContainerEdit's PopupControl is set to PopupContainerControl, and a TreeList is placed in PopupContainerControl to bind data to TreeList. Click the TreeList node to change the value of PopupContainerEdit.
Effect |
Problems |
Solution |
After selecting the tree node, change the value of PopupContainerEdit and automatically close the pop-up box. |
In the TreeList _ FocusedNodeChanged event, calling PopupContainerEdit. ClosePopup () will be invalid, and the pop-up box cannot be closed (click the X button or the area outside the dotted box will not be closed ). |
If you call TreeList. ExpandAll () after you bind the TreeList to the data, the preceding problem does not occur. The reason is that the bool attribute value of. IsPopupOpen of PopupContainerEdit is changed to False due to the expansion operation on the tree node (the actual interface is displayed as True, so it is considered as a BUG of this control ). In the ClosePopup method, the bool attribute value must be determined first. This parameter does not work when it is regarded as False. Eventually, ClosePopup () is invalid. The second solution is to call. ShowPopup () before calling PopupContainerEdit. ClosePopup () to change the. IsPopupOpen of PopupContainerEdit to True. In this way, ClosePopup () can take effect. |
Click the X button to close the pop-up box. |
Click the X button. When the pop-up box is closed, the control automatically changes the value of PopupContainerEdit to the initial value at the time of the pop-up, instead of the value assigned after the tree node is selected. |
Declare a global variable. In the _ FocusedNodeChanged event of TreeList, assign the node value to PopupContainerEdit and global variable. Then, process the _ Closed event of PopupContainerEdit and assign the value of the global variable to PopupContainerEdit. Of course, you must note that the global variables and PopupContainerEdit are in the same State. |
-20150826-