Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
      • About the DevOps Program
      • DataMiner DevOps Support
  • Downloads
  • More
    • DataMiner Releases & Updates
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Remove all Widgets from Section

Solved253 views13th May 2025
5
Nejra Fehratovic [SLC] [DevOps Advocate]145 12th May 2025 0 Comments

Hi dojo,

I’m running into a strange issue and could use your insight.

In my RemoveField method, I’m currently calling RemoveWidget for each widget in the selected section.
This works— all widgets are successfully removed—though I realize it’s not the most efficient approach.

While reviewing the documentation, I came across the Clear() method, which seems ideal for this use case.

However, when I replace my current code with section.Clear(), nothing happens. I trigger the same button click as before, but the section remains unchanged—none of the widgets are removed.

Any idea what I might be missing?

Thanks in advance for your help!

Nejra Fehratovic [SLC] [DevOps Advocate] Selected answer as best 13th May 2025

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
1
Thomas Remmery [SLC] [DevOps Advocate]690 Posted 12th May 2025 0 Comments

Looking at your code, and implying that you view instance is a Dialog, you’re removing the widgets from the Dialog, while the Section.Clear() only clears the widgets from the Section. If you have added the Section beforehand to the Dialog, the widgets of the Section will still be part of that Dialog.

Like Timothy mentioned, I would rebuild my Dialog after clearing the widgets from the Section or you keep using your own method, there’s nothing wrong with it.

A rebuild of the Dialog could look like this:

private void BuildUi() {

Clear();

AddWidget(new Label(“This is a label”), 0, 0);

AddSection(sectionThatWasCleared, 1, 0);

}

Nejra Fehratovic [SLC] [DevOps Advocate] Selected answer as best 13th May 2025
2
Timothy Van Poucke [SLC] [DevOps Enabler]1.18K Posted 12th May 2025 0 Comments

I can think of 2 possible reasons:

  1. do you use an InteractiveController? This is responsible for the event loop.
  2. do you Rebuild your dialog after you cleared the section?
Timothy Van Poucke [SLC] [DevOps Enabler] Answered question 12th May 2025
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs