We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Trouble with DataSource binding

Thread ID:

Created:

Updated:

Platform:

Replies:

132875 Sep 26,2017 09:23 AM Oct 3,2017 08:16 AM ASP.NET Web Forms 5
loading
Tags: Schedule
Kechaoui
Asked On September 26, 2017 09:25 AM

Hello,

It's possible to change my datasource when I clicked on differents views ('Day', 'Week', 'Month') ?

for example:

 when I'll click on the day view, my datasource must be like this

 <asp:SqlDataSource ID="SqlData" runat="server" ConnectionString="<%$ ConnectionStrings:ScheduleConnectionString %>"
            SelectCommand="SELECT * FROM [Appointment] WHERE date_appointments ='26/09/2017' ">asp:SqlDataSource>
  •  Week view binding
<asp:SqlDataSource ID="SqlData" runat="server" ConnectionString="<%$ ConnectionStrings:ScheduleConnectionString %>"
            SelectCommand="SELECT * FROM [Appointment] WHERE date_appointments >='26/09/2017' AND  date_appointments<='03/10/2017'">asp:SqlDataSource

Because, I can't use a global  datasource (like refer  there), when I've a table with +100000rows.


Best regards.

Karthigeyan Krishnamurthi [Syncfusion]
Replied On September 27, 2017 12:27 AM

 
Thank you for contacting Syncfusion support. 
 
Load on demand feature allows the Scheduler to retrieve only the filtered appointment data (for the current Scheduler date range and current view) from the service/database during both initial rendering and navigating the views. Kindly vist the below links to know more about the Load on demand feature. 
 
Regards, 
Karthigeyan 



Kechaoui
Replied On September 28, 2017 05:53 AM

Hi,


Thanks for those links, can I've an example with SqlDataSource please ?

Because in the sample it's with a List of ScheduleAppointmentsObjData, and in my case I need to fill my schedule with appointment from a sqlserver DB,  .

So, can I've an example combining LoadOnDemand and SqlDataSource ,   it would be perfect ! 


Regards.


Karthigeyan Krishnamurthi [Syncfusion]
Replied On September 29, 2017 03:08 AM

Hi Kechaoui, 
 
Thanks for your update. 
 
We have preapred the LOD CRUD sample using sql connection which can be download from the below location. 
 
Regards, 
Karthigeyan 




Kechaoui
Replied On October 2, 2017 10:32 AM

Hi,


Thanks a lot for your answers ! It was very helpful.

However, I got a last question, It is possible to use partial postback  ?  Usually, I used updatePanel for it, but he doesn't seems to works with ej:Schedule, do you have an alternative ?

Regards.


Nevitha Ravi [Syncfusion]
Replied On October 3, 2017 08:16 AM

Hi Kechaoui, 
 
Thanks for your update. 
 
We have prepared a sample using UpdatePanel which can be downloaded from the below location. 
 

<Code> 
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server"> 
    <asp:UpdatePanel ID="UpdatePanel1" runat="server"> 
        <Triggers> 
            <asp:AsyncPostBackTrigger ControlID="Schedule1" /> 
        </Triggers> 
        <ContentTemplate> 
            <ej:Schedule ID="Schedule1" ClientIDMode="Static" Height="525px" EnableLoadOnDemand="true" Width="100%" CurrentDate="5/5/2014" runat="server"> 
                <AppointmentSettings ApplyTimeOffset="false" Id="Id" Subject="Subject" AllDay="AllDay" StartTime="StartTime" EndTime="EndTime" Recurrence="Recurrence" RecurrenceRule="RecurrenceRule" /> 
                <DataManager CrossDomain="true" URL="Default.aspx/GetData" CrudURL="Default.aspx/CrudResult" InsertURL="Default.aspx/InsertData" UpdateURL="Default.aspx/UpdateData" RemoveURL="Default.aspx/RemoveData" Adaptor="UrlAdaptor" /> 
            </ej:Schedule> 
        </ContentTemplate> 
    </asp:UpdatePanel> 
</asp:Content> 
</Code> 

Regards, 
Nevitha. 
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;