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
45
Calendar Preview - Loading data on demand
posted

Hello,

Is there any attribute in the UltraSchedulePrintDocument that causes it to retrieve its data on demand?

Similar to the LoadOnDemand style in the ultraGrid?

I have tried to couple an ultraCalendarInfo with an ultraDataSource with no success,

Is there any sample code out there that shows how to do it?

Thank you,

Parents
  • 2094
    Offline posted

    Hi Centerbase,

    It does not support ON-Demand loading of data however you can quite easily roll your own version of this.

    Assuming that your UltraCalendarInfo is bound to a datasource such as a dataset, then it is pretty easy.

    I do something similar already with my scheduling application.

    I am working in a .NET Remoting environment which traverses SLOW network links. I am using the "AllProperties" binary field also for reasons I wont go into, but basically I have be "considerate" about how much data I pull over the network in any one call. So I do a "On-demand" loading of appointment data in my application.

    I do not want to do download the ENTIRE dataset of appointments that exist in the database... so I maintain a HIGH/LOW Date which keeps track of the "Date-Span" that I have downloaded from the server. For instance.... I download all appointments from TODAY till +7 Days (Pseudo Sql query something similar to  "SELECT * FROM tblAppointments WHERE StartDateTime BETWEEN MidnightToday AND and Midnight+7Days"

     

    At this point:

    LOWDATE = Midnight Today (0000hrs)
    HIGHDATE = Midnight Today + 7 days

    If I move to a date which is less or greater than the HIGH/LOW dates then I expand my HIGH/LOW dates and retrieve the "missing" appointments from the new date-span and merge my datasets.... so lets assume I select a date which is 14 days away from today then i do the following:

    DataSet = GetData(SELECT * FROM tblAppointments WHERE StartDateTime BETWEEN HighDate AND and NewlySelectedDate")

    Now i merge this dataset with the Original dataset that the CalInfo control is bound to and call CalInfo.DataBindingsForAppointments.RefreshData()

    There is some management of row states that you will have to do such as calling ACCEPT/REJECT changes when you merge the datasets etc and to make sure that changes are committed to the server before you merge the datasets etc but overall it is pretty easy.

    Hmmm after reading your post again I am not sure if this is exactly what you want/need.... either way it should hopefully help someone.

    Regards
    Aaron

     

Reply Children
No Data