Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1706
Need suggestions on recommended controls to use to display info in a calendar like format
posted

I have a request from a client to create a new interface for some proprietary scheduling data we have in our SQL database.

The requirements are as follows:

The scheduling data needs to be laid out in a calendar format to be able to be viewed 1 day/week/2 week/month at a time and be able to switch between these views.
Inside each day there needs to be detail and summary data.  That detail and summary data can consist of multiple rows (tasks) and columns of data, all of which could have a custom format (text/back color) applied to them.
They also want to see something like a progress bar as a background of each row that shows the percent completion of each task (row).

I was wondering if I could use an UltraMonthViewMulti or a UltraMonthViewSingle as the primary calendar control for this, possibly inject 2 wingrids to get the rows & columns (with formatting ability), but I am not sure if it would be the right way to go, or truly even how to accomplish this.

I appreciate any help or suggestions in this matter.

Seradex

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi Seradex,

    There are a number of approaches you could take here. UltraMonthViewMulti only shows numbers and doesn't really have any space for data within a day. But it sounds like using UltraWeekView and UltramonthViewSingle would be good for your purposes.

    Showing complex content inside a day isn't something these controls support out of the box, but it should be possible with a little clever coding. Your idea of using UltraWinGrids inside the day would be pretty simple to implement, but whether or not this is a good approach depends on how much content you intend to display at once. If you have 30 or more days visible at a time and each day has 2 WinGrids in it, that's 60 or more grids on-screen at once and that probably won't be very efficient. You are likely to run into some performance issues.

    Another approach you might take is to simply generate an image for each day. You could write a method that creates a Bitmap and draws the data you want directly into it with whatever layout and formatting you want. Or you could skip the image and use a DrawFilter to draw directly into the control. Both of these approaches assume that the contents of the day don't have to be UI interactive, though. If the user needs to be able to click on a particular item within a day and have something happen, then this probably isn't the way to go.

    Another approach would be to use a CreationFilter and embed one or more UIElements into the day. You can't realistically embed a WinGrid into the control in this way, but you could embed a FormattedTextUIElement which provides functionality similar to RichText or Html. Or you could add a bunch of TextUIElements and some ButtonUIElements, and of course, a ProgressBarUIElement. You could even create a UIElement of your own that contains some combination of these elements and then re-use it. This approach is obviously the most complex and requires the most coding, but it's also the most flexible and it should be efficient enough so as not to cause performance issues with your application.

    In fact, even if you decide to go with the grid approach, it would probably be a good idea to use the CreationFilter to position the grid(s) inside the days.

    Whatever approach you take, you will have to decide what to do if the information for one particular day doesn't fit within the available space. Do you want a scrollbar? Or a sort've "more info" button that shows the details? Either of those could be achieved with a CreationFilter, but the Scrollbar approach is trickier, as you need to somehow keep track of the scroll position of each day's list.

    I can't see any reason why any of this would not be achievable, but it's not trivial and will require some coding. Of course, I'd be happy to help you out with any of these approaches.

Children