This is a migrated thread and some comments may be shown as answers.

Appointment DragAndDrop problem

3 Answers 77 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Lorenzo
Top achievements
Rank 1
Lorenzo asked on 27 Jan 2012, 09:32 AM
Hi!

I have a big problem with the appointment DragAndDrop. I updated my website to the last version of DLL and then DragAndDrop don't work.
If I reload the 2011.2.915.40 DLL versione DragAndDrop work.


What can I do?


Thanks in advance

Francesco Balatti
fra@zelando.com

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 27 Jan 2012, 11:59 AM
Hi Francesco,

Can you reproduce the problem with any of the online demos?


Regards,
Peter
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Lorenzo
Top achievements
Rank 1
answered on 01 Feb 2012, 05:03 PM
No.

This is my scenario:

<telerik:RadScheduler runat="server" ID="m_trs_Gantt" SelectedView="TimelineView"
               DataSourceID="m_gvwUpdate_GroupSimulationDriversGanttDataSource" DataKeyField="InitiativeId"
               DataSubjectField="InitiativeName" DataStartField="DeltaDevPeriodStart" DataEndField="DeltaEnergyStreamPeriodEnd"
               OverflowBehavior="Scroll" Height="350px" ShowHeader="false" AllowDelete="false"
               AllowInsert="false" AllowEdit="false" OnClientAppointmentEditing="OnClientAppointmentEditing"
               OnAppointmentUpdate="m_trs_Gantt_OnAppointmentUpdate" ColumnWidth="19px" OnTimeSlotCreated="m_trs_Gantt_TimeSlotCreated">
               <ResourceTypes>
                  <telerik:ResourceType KeyField="InitiativeID" Name="InitiativeName" TextField="InitiativeName"
                     ForeignKeyField="InitiativeID" DataSourceID="m_gvwUpdate_GroupSimulationDriversGanttDataSource" />
               </ResourceTypes>
               <TimelineView UserSelectable="true" SlotDuration="365" HeaderDateFormat="yy" ColumnHeaderDateFormat="yy"
                  GroupBy="InitiativeName" GroupingDirection="Vertical" />
               <AppointmentTemplate>
                  <div id="m_div_DevNotEqualContr" runat="server">
                     <div id="m_div_PeriodStartFirst" runat="server">
                        &nbsp;
                     </div>
                     <div id="m_div_PeriodStart" runat="server">
                        &nbsp;
                     </div>
                     <div id="m_div_PeriodConstruction" runat="server">
                        &nbsp;
                     </div>
                     <div id="m_div_PeriodEnergy" runat="server">
                        &nbsp;
                     </div>
                     <div id="m_div_PeriodEnergyEnd" runat="server">
                        &nbsp;
                     </div>
                  </div>
                  <div id="m_div_DevEqualContr" runat="server" >
                     <div id="m_div_PeriodStartFirstEqual" runat="server">
                        &nbsp;
                     </div>
                     <div id="m_div_PeriodConstructionEqual" runat="server">
                        &nbsp;
                     </div>
                     <div id="m_div_PeriodEnergyEqual" runat="server">
                        &nbsp;
                     </div>
                     <div id="m_div_PeriodEnergyEndEqual" runat="server">
                        &nbsp;
                     </div>
                  </div>
               </AppointmentTemplate>
            </telerik:RadScheduler>


protected void m_trs_Gantt_TimeSlotCreated(object sender, Telerik.Web.UI.TimeSlotCreatedEventArgs e)
      {
         StrategicPeriods wStrategicPeriod = StrategicPeriodsManager.Read(int.Parse(Request.QueryString["StrategicPeriodID"].ToString()));
         if (e.TimeSlot.Start.Date.Year == int.Parse(wStrategicPeriod.FromYear))
         {
            e.TimeSlot.CssClass = "strategicPeriod";
         }
         else if (e.TimeSlot.Start.Date.Year == int.Parse(wStrategicPeriod.ToYear))
         {
            e.TimeSlot.CssClass = "strategicPeriod";
         }
      }


protected void m_trs_Gantt_OnAppointmentUpdate(object sender, AppointmentUpdateEventArgs e)
      {
         m_lbl_SaveResult.Visible = false;
         GroupSimulations wGroupSimulations = GroupSimulationsManager.Read(int.Parse(Request.QueryString["SimID"].ToString()));
         m_View_hdn_SimulationID.Value = wGroupSimulations.SimID.ToString();
         m_View_lbl_SimulationName.Text = wGroupSimulations.SimID.ToString() + " - " + wGroupSimulations.SimName;

         if (!wGroupSimulations.IsReadOnly)
         {
            if (e.Appointment.ID == e.ModifiedAppointment.ID)
            {
               DataTable wHeader = GroupSimulationDriversInitiativesTempManager.ReadGanttHeader(int.Parse(Request.QueryString["SimID"].ToString()));
               if (wHeader != null && wHeader.Rows.Count > 0)
               {
                  int wOldStartYear = e.Appointment.Start.Year;
                  int wNewStartYear = e.ModifiedAppointment.Start.Year;

                  int wDelta = wNewStartYear - wOldStartYear;

                  //Non si può spostare un GANTT oltre il confine degli anni visualizzati
                  if ((int)wHeader.Rows[0][0] <= wNewStartYear && (int)wHeader.Rows[0][wHeader.Columns.Count - 1] >= e.ModifiedAppointment.End.Year)
                  {
                     GroupSimulationDriversInitiativesList wInitiativesList = GroupSimulationDriversInitiativesManager.ReadAllByInitiativeID(int.Parse(m_View_hdn_SimulationID.Value), (int)e.ModifiedAppointment.ID);

                     GroupSimulationDriversInitiativesTempManager.UpdateGantt(wInitiativesList[0].SimID, wInitiativesList[0].InitiativeID, wNewStartYear.ToString(), (int.Parse(wInitiativesList[0].ConstructionPeriodStart) + wDelta).ToString(), (int.Parse(wInitiativesList[0].EnergyStreamPeriodStart) + wDelta).ToString(), e.ModifiedAppointment.End.Year.ToString());

                     m_trs_Gantt.Rebind();
                  }
               }
            }
         }
      }


Have you the solution?


Thanks in advance

Have a nice day

Francesco Balatti
Zelando.com
0
Peter
Telerik team
answered on 02 Feb 2012, 03:58 PM
Hi Lorenzo,

I made some changes to your code to make it run locally, but I wasn't able to replicate the issue.

If you can send us a working sample of the issue via a support ticket, we will be able to provide you with more specific instructions.

All the best,
Peter
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Scheduler
Asked by
Lorenzo
Top achievements
Rank 1
Answers by
Peter
Telerik team
Lorenzo
Top achievements
Rank 1
Share this question
or