Advertisement
Guest User

Untitled

a guest
Oct 17th, 2013
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. RaiseBubbleEvent(Me, args)
  2.  
  3. Protected Overrides Function OnBubbleEvent(ByVal source As Object, ByVal args As System.EventArgs) As Boolean
  4.  
  5. MyControlThatNeedsUpdated grid = (MyControlThatNeedsUpdated)FindControlRecursive(Page, "MyControlThatNeedsUpdated");
  6. grid.updateList();
  7.  
  8.  
  9. private Control FindControlRecursive(Control root, string ControlType)
  10. {
  11. if (root.GetType().Name == ControlType)
  12. {
  13. return root;
  14. }
  15.  
  16. foreach (Control c in root.Controls)
  17. {
  18. Control t = FindControlRecursive(c, ControlType);
  19. if (t != null)
  20. {
  21. return t;
  22. }
  23. }
  24.  
  25. return null;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement