Block.00/00

/*Answers to Q&A Dashboards Livestream*/

People, colleagues, DataFlex, Q&A, Livestream
May 9, 2025

Our livestream on Dashboards in DataFlex was packed with insights, practical examples, and a closer look at how dashboards help you turn data into action.

You asked some great questions! Some of them came in live, others were sent ahead of time or dropped in via email. We’ve gathered them all, added a few extra details where needed, and wrapped them up in this article.

Curious what others wanted to know, or missed part of the Q&A? Scroll down and catch up!

Go to Portuguese answers     Go to German answers

 
  
  • Can you add only DataFlex controls to the widget?
    Basically anything you can add to a web application is possible here too. You can use any control, make widgets data-aware, and even use direct SQL in your widgets. Anything that works in the DataFlex Web Framework can also be done in a widget.
  • How can I create a custom Dashboard with custom widgets?
    You can also write DataFlex code to define exactly which widgets you want, where they should appear on the dashboard, and how they should be configured. Or you can just use the visual interface: drag widgets onto the screen, and they’ll automatically become part of the configuration. You can also define a custom dashboard configuration by filling the configuration structs in your code. There are many ways to build and customize your dashboard.
     
  • Saving the settings for the widgets? Is that only through local storage or also in the database?
    We’ve added several hooks to the Dashboards framework, with the main ones being the OnLoadConfiguration and OnSaveCustomConfiguration. These give you access to the full struct that defines the entire dashboard setup. This includes which widgets it contains, their size and position and configuration settings.

    You can use this struct to, for example, convert the data to JSON and store it in a database field linked to a specific user. That way, you can easily tie a personalized dashboard to a user. Alternatively, you can save it to a config file, there are several options. It works similarly to how the WebList handles its custom layout configuration.
     
  • If you start with local storage, can you request that data from the server if you later switch to storing it in the database?
    Yes, if you start with local storage, you can migrate the configuration to the server when you switch to storing it in the database. For example, work with versions. In version 1, dashboard configs are stored in local storage, but in version 1.5, they are moved to the database. When the user logs in, you can run an initialization check to transfer the configuration. Since widget configurations are already processed through DataFlex code, you can hook into that process to handle the migration.
     
  • Where can I find the demo that is used in the presentation?
    It’s on the DataFlex.dev GitHub account!
     
  • What types of charts can I use in dashboards?
    We are working on a chart library that will let you integrate different JavaScript charting libraries within the DataFlex Web Framework. Essentially, we’re building a control that can host these charts, and we’ll provide a generic API that works with various libraries like Chart.js, HighCharts and Syncfusion Charts.

    This library will be available soon and can be used in Dashboards. Another option is the Web Drawing control, where DataFlex code generates the charts for you without the need for custom controls. You can also find charting libraries on the forums, for example:
  • How to change the charts type?
    The charting library used in the example supports multiple chart types. We plan to release this library soon. To change the chart type, you can directly modify the value in the library through the API. This could be done by adjusting the widget’s configuration. You’d reshape the widget slightly, change the chart type, and the data will remain valid, just displayed in a different format. The chart type is controlled by a specific property.
     
  • Can you use Dasbhoards also in a Windows application?
    Yes, you can use FlexTron to integrate web controls into a Windows application. Simply create a cLocalWebControlHost container in your application and place the cWebWidgetContainer inside it.
     
  • Do widgets also support tablet mode drag drop and customization?
    No, drag ‘n drop and rearranging the dashboards via touch is not supported. This is on our wish list. It could be done programmatically by providing an alternative interface. The default dashboard configuration does support responsiveness using WebSetResponsive.
     
  • Can widgets talk to API formats?
    Within DataFlex, you can consume various types of APIs, including web services and C-type APIs. You can definitely build widgets that interact with an API, load data from it, and display it. It’s fully supported.
     
  • Is SQL possible in the widgets?
    Yes, definitely! We’ve also made significant improvements to how SQL queries are handled and executed in DataFlex. You can take full advantage of that in your widgets. Make your widgets data-aware without Data Dictionaries - SQL is an option.
     
  • If you have more than one widget container inside a view, can you drag widgets from one container to another?
    The cWebWidgetContainer currently cannot act as a drag source for the cWebDragDropHandler, only as a drop target. We’ll put this on our wish list and see if we can support this in a future revision.
     
  • If you have several views with fully laid-out and configured dashboards, and you want to add a new widget to the dashboard so everyone can see it, how would you approach that?
    That’s not necessarily part of the framework itself, but the container does include logic that lets you take the configuration, reshape it, and update it. So the next time the dashboard loads, the widget will be there. You can work with version numbers for the widget configuration. If you increment that version, it invalidates any stored configurations and users will fall back to the default dashboard. If you want to add a new widget to existing dashboard configuration, you’ll need to write custom code. For example, by running a check during initialization to apply the correct configuration.
     
  • If I have the composite window open in the Studio and the designer handles it fine, will the designer also model it correctly if I open it as a cWebGroup with objects inside?
    The designer looks for a meta tag called "component type," which is set to cWebWidget. This is what the Studio picks up to create a model in the designer. You can set this on your own subclass of cWebGroup, or even on the composite. It’s easy to do, just check the cWebWidget class and see which meta tags are set. You can then add that meta tag to your own composite implementation, and it should work.
     
  • Besides widgets, what are other good uses of composite classes? Things to should or should not do?
    What you should not do - not entirely sure yet, as it’s a low-level language feature with many possibilities. Some customers suggested that it could be used to share DDO structures between different views, which could technically work but the studio will not pick up on this. The composite classes works well with the dynamic object container, which is what it’s built for. Using the composite class is the natural approach.
     
  • What is next for Dashboards?
    There isn’t anything major directly on top of Dashboards at the moment, just some minor tweaks. However, we’re really excited to see what you’ll do with these dashboards. In terms of big upcoming product releases, the Package Manager and Technology Stack are set to transform the landscape of web app development in DataFlex. 
Block.00/00

Join the Technology Stack Livestream + Q&A

Want to know where DataFlex is headed? Join us for this free semi-live session and get an inside look at the evolving tech stack that’s shaping the future of DataFlex development.

This isn’t just a recap - it’s a roadmap. We’ll walk you through what’s new, what’s coming, and why it all matters. From frontend flexibility to backend power, we’re building a platform that’s ready for what’s next - and we want you in the loop.

Register now