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
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.
I was just notified this afternoon that my requirements have actually been reduced due to one client re-evaluating their needs. They think they will be going in a different direction.
Basically I no longer need multiple columns of data per row as the few pieces I need could be concatenated together as long as I can associate that with an ID that I can use to refer back to my SQL data. I also no longer need any summary data in each day.Note that I did see based on your response that I might have been able to do the summary data from the old requirement by using a few text boxes and labels embedded below the grid, but since it is no longer needed it helps to simplify things.
I still need the text/back color and a progress bar behind (underlying) the row basically as if the text was in the progress bar. There will be no need to edit this text directly.This is basically to display the status of scheduled items and show when it is occurring. It will also be required to allow them to move an item (row/task) to a different day/time. I thought this would be the least challenging thing as I have done drag & drop with Infragistics before (within a wingrid) and could present them with a pop-up date-time control for precise control.
Also, you are probably right that I would need scroll bars as the client may have more things than can be displayed in each day.
Does either UltraWeekView or UltramonthViewSingle allow me to present a single day view and a 2 week view, or would I need a different base control for the day view and 2 UltraWeekViews for the 2 week view?
Basically the client wants to be able to simply & quickly switch between these views similar to within Outlook Calendar. The intended look is to be similar to an enhanced Outlook Calendar with the Day, Week, and Month (with High Detail) views. The two week view would either be like two Outlook Week views stacked on top of one another, or like the high detail Month View that only shows 2 weeks.
The other concern I had was speed as I once tried to implement your Windows Forms Gantt control using our custom data and it ended up taking over 10 minutes to load the data into the Gantt including all of the assignments, etc., and that was with much less data than what our clients typically have. I believe it was because I was unable to load everything via binding, and am hoping that when I return to this that I will be able to do binding using perhaps your WPF Gantt control - but this is off topic.Basically it is ok if the UI takes up to a minute to initialize, but each time frame's data must be loaded in very quickly.
Also, I completely expected that very little of this would be trivial (if anything).
I was wondering if these controls already have the ability to show a list of items similar to how Outlook does? Note that I have looked around in the documentation, but am having a hard time figuring it out with the short timeline I was given to come up with a design. Is there a sample project you could direct me to that illustrates the abilities it has as that could be very helpful. Note that development is not scheduled to begin until about two weeks from now.
I hope this was helpful to simplify and clarify things.
I greatly appreciate your assistance with this.
Hi,
Okay... if you need a scrollbar, that makes things very tricky. You'd basically have to get involved in using a ScrollInfo and some kind of scrollable element which is what we do internally for our controls. That, I think, will be the most difficult part of what you need here. I can try to point you in the right direction there, but implementing something like that would take some research and might be a bit beyond the scope of the support we can provide and border on consulting. :)
Alternately, you could go with your original idea of using a control, like a grid or maybe even a ListView. The biggest concern with this approach is performance. If you have 30 controls on the form (one for every day of the month), then that might cause problems. It would, however, greatly simplify things, since the grid or ListView or whatever control you use would have it's own scrollbar.
For the text and BackColor, you might be able to just use the normal Tasks that WeekView and MonthViewMulti already support. But I'm pretty sure that they don't scroll - they just get clipped and the cell shows a button indicating that there is more to see.
You could use a CreationFilter to change the background of the Task into a ProgressBar. That would not be too difficult. The trickiest part would be determining where to store the percentage, and you could get that from some custom data or store it on the tag of the Task, depending on which approach you take.
seradex said:Does either UltraWeekView or UltramonthViewSingle allow me to present a single day view and a 2 week view, or would I need a different base control for the day view and 2 UltraWeekViews for the 2 week view?
No... but a single day is just a box, right? So you don't really need anything special for this. You could actually use a WinGrid, a ListView, or a Panel with some TextBoxes and other controls to show a single day, couldn't you?
seradex said:The other concern I had was speed as I once tried to implement your Windows Forms Gantt control using our custom data and it ended up taking over 10 minutes to load the data into the Gantt including all of the assignments, etc., and that was with much less data than what our clients typically have. I believe it was because I was unable to load everything via binding, and am hoping that when I return to this that I will be able to do binding using perhaps your WPF Gantt control - but this is off topic.Basically it is ok if the UI takes up to a minute to initialize, but each time frame's data must be loaded in very quickly.
I can't see why it should take that long, but I suppose if you are loading a tremendous amount of data, it might take a while.
seradex said:I was wondering if these controls already have the ability to show a list of items similar to how Outlook does? Note that I have looked around in the documentation, but am having a hard time figuring it out with the short timeline I was given to come up with a design. Is there a sample project you could direct me to that illustrates the abilities it has as that could be very helpful. Note that development is not scheduled to begin until about two weeks from now.
These controls are designed to mimic MS Outlook. So yes, they do show a list of tasks inside a day. But Outlook doesn't scroll within a day as far as I know. And they don't show ProgressBars. Like I said, the ProgressBar is fairly easy to achieve. Showing tasks with Text and colors would also be easy. The scrollbar is the only thing you mentioned here that would really be tough to do.
Regarding samples, yes, the suite includes samples that demonstrate all of these control working together. You can download a free trial and get the samples.
I just reviewed outlook and found that when using a single week view or a day view, the user is able to scroll, however it scrolls the data for all days in the range as one element leaving the dates as a fixed row header always being visible. There is no scrollbar in Outlook 2010 when in detailed Month View
About the two-week view, can that be done using the UltraMonthViewSingle control with say a specified date range (is that even possible), or would I need to stack two UltraWeekView controls?
The other concern lost in the shuffle was about the speed of switching views, however if I only need to use say the UltraMonthViewSingle control with specifying a date range, then likely there would be no issue here. Any feedback you can provide for this would be appreciated.
Regarding the scrollbar for the month view, I am meeting with someone today, so I will discuss this with him to see if any alternatives would be acceptable and will update this after the meeting.
Thank you again for your help.
Cool. Glad to hear it. :)
I just wanted to let you know that the information you provided was instrumental in achieving the desired goals. I managed to simulate the progress bar by manually drawing the back color for part of the appointment based on the percent complete of the task. I didn't require anything other than a static progress bar like indicator.
Loading an isl file is basically just another way of setting properties on the controls. Or, to be more precise, it's another way of resolving the values of those properties (since it doesn't actually set the property value in most cases).
So with a few rare exceptions, the isl doesn't let you do anything that the control doesn't already do. It's just a question of finding the right property to do it. :)
Thank you very much.
It appears that this was exactly the info was looking for. I wasn't planning to use an isl file in my application. I just couldn't figure out how to get it to do what I wanted.
Preventing it from loading the isl file and setting the ViewStyle to Office2007 appears to have done the trick.
Thank you very much for all of your help, it is most appreciated.
Just to clarify... are you planning to use IG.Isl in your application? This is an Isl file that we use for our samples, but there's no reason why you need to use it in your application. You could use a different isl included with the Infragistics suite, create your own isl, or use no isl. Is there some reason why you are assuming that you will be using the same isl in your app that the sample is using?
If you are not going to use this Isl, then you might want to comment out this line of code in the sample:
Infragistics.Win.AppStyling.StyleManager.Load(islFile)
This way, the Isl is not loaded at all and you will see how the controls look without it.
At that point, you could either try to create an isl that gives you the look you want or try to get what you want via property settings in the application.
Anyway, regarding the 4 points you listed here, these all appear to be functions of the ViewStyle property. The ISL is setting the ViewStyle of the UltraDayView to Office2007. So you can either create an isl that does this or simply set the ViewStyle to Office2007 in code. The ViewStyle is a property on the UltraCalendarLook which is a component that all of the Schedule controls attach to, similar to the UltraCalendarInfo. So it will affect all of the controls.
It might be possible to achieve these settings individually (without setting the ViewStyle), but I'm not absolutely sure. Presumably, it would be done via some other properties on the UltraCalendarLook. I could check into it, if you need it.