2017-07-21 1 views
0

J'ai un problème avec les ressources affichées dans la liste déroulante aspxscheduler: lorsque je sélectionne un programme (à partir de la grille à gauche), le planificateur aspx est rappelé, la ressource est liée dans le planificateur, mais le liste déroulante de ressources non visible. quand je change la vue, la liste déroulante sera visible.Aspxscheduler Binding Resources DropDown

Je pense que le problème est que la liste déroulante n'est pas liée lorsque aspxscheduler est rappelé. Alors, comment puis-je accéder à la liste déroulante?

Merci,

+0

Afficher le code qui cause problème. Il est difficile de prévoir le problème avec la description sans implémentation de code. –

Répondre

0

Ce mon code côté client

<dx:ASPxScheduler ID="SchAuditProgram" runat="server" Width="100%" Theme="Aqua" ClientInstanceName="SchAuditProgram" IncrementalFilteringMode="Contains" 
                 AppointmentDataSourceID="AuditSchedulingDataSource" ResourceDataSourceID="SqlAuditByProgramDS" ActiveViewType="Timeline" 
                 GroupType="Date" OnCustomCallback="SchAuditProgram_CustomCallback" OnPopupMenuShowing="SchAuditProgram_PopupMenuShowing"> 
                 <OptionsCustomization AllowAppointmentDrag="None" AllowAppointmentDragBetweenResources="None" AllowAppointmentEdit="None" 
                  AllowInplaceEditor="None" /> 
                 <ResourceNavigator EnableIncreaseDecrease="false" /> 
                 <ClientSideEvents MenuItemClicked="function(s, e) {SchAuditProgram_MenuItemClicked(e);}" 
                  AppointmentDoubleClick="function(s, e) {SchAuditProgram_AppointmentDoubleClick();}" 
                  Init="SchAuditProgram_Init" /> 

                 <Storage> 
                  <Appointments AutoRetrieveId="true"> 
                   <Mappings 
                    AppointmentId="ID" 
                    Start="BeginDate" 
                    End="EndDate" 
                    TimeZoneId="(none)" 
                    Subject="Description" 
                    Type="EventType" 
                    Status="Status" 
                    ResourceId="AuditID" /> 

                   <%-- <CustomFieldMappings> 
                 <dx:ASPxAppointmentCustomFieldMapping Name="AuditCode" 
                  Member="AuditCode" ValueType="String" /> 
                </CustomFieldMappings>--%> 
                  </Appointments> 
                  <Resources> 

                   <Mappings Caption="AuditCode" ResourceId="ID" /> 
                   <CustomFieldMappings> 
                    <dx:ASPxResourceCustomFieldMapping Name="PlannedBeginDate" 
                     Member="PlannedBeginDate" ValueType="String" /> 
                    <dx:ASPxResourceCustomFieldMapping Name="PlannedEndDate" 
                     Member="PlannedEndDate" ValueType="String" /> 
                    <dx:ASPxResourceCustomFieldMapping Name="NomSociete" 
                     Member="NomSociete" ValueType="Integer" /> 
                    <dx:ASPxResourceCustomFieldMapping Name="Auditors" 
                     Member="Auditors" ValueType="String" /> 
                    <dx:ASPxResourceCustomFieldMapping Name="Responsible" 
                     Member="Responsible" ValueType="String" /> 
                    <dx:ASPxResourceCustomFieldMapping Name="AuditCategory" 
                     Member="AuditCategory" ValueType="String" /> 
                    <dx:ASPxResourceCustomFieldMapping Name="FunctionsAudited" 
                     Member="FunctionsAudited" ValueType="String" /> 
                    <dx:ASPxResourceCustomFieldMapping Name="ProcessAudit" 
                     Member="ProcessAudit" ValueType="String" /> 
                    <dx:ASPxResourceCustomFieldMapping Name="ProjectName" 
                     Member="ProjectName" ValueType="String" /> 
                   </CustomFieldMappings> 
                  </Resources> 

                 </Storage> 


                 <Views> 
                  <TimelineView IntervalCount="1" ResourcesPerPage="3"> 
                   <Scales> 
                    <cc1:TimeScaleYear DisplayName="année" /> 
                    <cc1:TimeScaleMonth DisplayName="Mois" Enabled="false" /> 
                    <cc1:TimeScaleQuarter DisplayName="Trimestre" Enabled="false" /> 
                   </Scales> 

                  </TimelineView> 
                  <DayView VisibleTime-Start="07:00" VisibleTime-End="19:00" ResourcesPerPage="1"> 
                   <VisibleTime Start="07:00:00" End="19:00:00"></VisibleTime> 
                   <TimeRulers> 
                    <cc1:TimeRuler></cc1:TimeRuler> 
                   </TimeRulers> 
                   <Templates> 
                    <HorizontalAppointmentTemplate> 
                     <div id="cc" class="popUp"> 
                      <div style="border-bottom: 1px Solid #c0c0c0; text-align: center; font-size: small; font-weight: bold; color: black;"> 
                       <%# Container.AppointmentViewInfo.Appointment.Subject %> 
                      </div> 
                      <br /> 
                      <table style="width: 400px" align="center"> 

                       <tr> 
                        <td class="label_td4"> 
                         <%= IntranetAPI.CommunUtility.getRessourceEntry("lbBeginDate", ressFilePath) %> : 
                        </td> 
                        <td style="font-size: 11px; text-align: left; width: 180px"> 
                         <%# Container.AppointmentViewInfo.Appointment.Start %> 
                        </td> 
                        <td class="label_td4"> 
                         <%= IntranetAPI.CommunUtility.getRessourceEntry("lbEndDate", ressFilePath) %> : 
                        </td> 
                        <td style="font-size: 11px; text-align: left; width: 180px"> 
                         <%# Container.AppointmentViewInfo.Appointment.End %> 
                        </td> 
                       </tr> 
                      </table> 

                     </div> 


                    </HorizontalAppointmentTemplate> 
                   </Templates> 
                  </DayView> 
                  <WorkWeekView Enabled="false" VisibleTime-Start="07:00" VisibleTime-End="19:00"> 
                   <VisibleTime Start="07:00:00" End="19:00:00"></VisibleTime> 
                   <TimeRulers> 

                 <AppointmentDisplayOptions ShowRecurrence="True"></AppointmentDisplayOptions> 
                  </MonthView> 

                  <FullWeekView> 
                   <TimeRulers> 
                    <cc1:TimeRuler></cc1:TimeRuler> 
                   </TimeRulers> 
                  </FullWeekView> 

                 </Views> 

                 <Templates> 
                  <VerticalResourceHeaderTemplate> 
                   <div style="border-bottom: 1px Solid #c0c0c0; text-align: center; font-size: large; font-weight: bold; color: black;"> 
                    <%# Container.Resource.Caption %> 
                   </div> 
                   <br /> 
                   <table style="width: 380px;"> 

                    <tr> 
                     <td class="label_td2"> 
                      <%= IntranetAPI.CommunUtility.getRessourceEntry("lbBeginDate", ressFilePath) %> : 
                     </td> 
                     <td style="font-size: 11px; text-align: left; width: 180px"> 
                      <%# Container.Resource.CustomFields[0].ToString().Split(' ')[0]%> 
                     </td> 

                     <td class="label_td2"> 
                      <%= IntranetAPI.CommunUtility.getRessourceEntry("lbEndDate", ressFilePath) %> : 
                     </td> 
                     <td style="font-size: 11px; text-align: left; width: 180px"> 
                      <%# Container.Resource.CustomFields[1].ToString().Split(' ')[0]%> 
                     </td> 
                    </tr> 
                    <tr> 
                     <td class="label_td2"> 
                      <%= IntranetAPI.CommunUtility.getRessourceEntry("lblSociete", ressFilePath) %> : 

                     </td> 
                     <td style="font-size: 11px; text-align: left; width: 180px"> 
                      <%# Container.Resource.CustomFields[2] %> 
                     </td> 
                     <td class="label_td2"> 
                      <%= DotNetNuke.Services.Localization.Localization.GetString("gwIsResponsible", ressFilePath)%> : 

                     </td> 
                     <td style="font-size: 11px; text-align: left; width: 180px"> 
                      <%# Container.Resource.CustomFields[4] %> 
                     </td> 
                    </tr> 

                    <tr> 

                     <td class="label_td3"> 
                      <%= DotNetNuke.Services.Localization.Localization.GetString("gvwAuditors", ressFilePath)%> : 
                     </td> 
                     <td style="font-size: 11px; text-align: left; width: 180px" colspan="3"> 
                      <%# Container.Resource.CustomFields[3] %> 
                     </td> 
                    </tr> 

                    <tr> 

                     <td class="label_td3"> 
                      <%= DotNetNuke.Services.Localization.Localization.GetString("tMenuAuditCategory", ressFilePath)%> : 
                     </td> 
                     <td style="font-size: 11px; text-align: left; width: 180px" colspan="3"> 
                      <%# Container.Resource.CustomFields[5] %> 
                     </td> 
                    </tr> 


                    <tr> 

                     <td class="label_td3"> 
                      <%= DotNetNuke.Services.Localization.Localization.GetString("TProcessusAudited", ressFilePath)%> : 
                     </td> 
                     <td style="font-size: 11px; text-align: left; width: 180px" colspan="3"> 
                      <%# Container.Resource.CustomFields[7] %> 
                     </td> 
                    </tr> 

                    <tr> 

                     <td class="label_td2"> 
                      <%= DotNetNuke.Services.Localization.Localization.GetString("hProjet", ressFilePath)%> : 
                     </td> 
                     <td style="font-size: 11px; text-align: left; width: 180px" colspan="3"> 
                      <%# Container.Resource.CustomFields[8] %> 
                     </td> 
                    </tr> 

                    <tr> 
                     <td></td> 
                    </tr> 
                    <tr> 
                     <td style="text-align: right" colspan="4"> 
                      <a href="RequirementNormManagement.ascx"> 
                       <%= DotNetNuke.Services.Localization.Localization.GetString("lblSeeMore", ressFilePath)%> 
                      </a> 
                     </td> 
                    </tr> 


                   </table> 

                  </VerticalResourceHeaderTemplate> 

                  <HorizontalResourceHeaderTemplate> 
                   <div style="border-bottom: 1px Solid #c0c0c0; text-align: center; font-size: large; font-weight: bold; color: black;"> 
                    <%# Container.Resource.Caption %> 
                   </div> 
                   <br /> 
                   <table style="width: 380px;" align="center" class="TableStyle"> 

                    <tr> 
                     <td class="label_td2"> 
                      <%= IntranetAPI.CommunUtility.getRessourceEntry("lbBeginDate", ressFilePath) %> : 
                     </td> 
                     <td style="font-size: 11px; text-align: left; width: 180px"> 
                      <%# Container.Resource.CustomFields[0].ToString().Split(' ')[0]%> 
                     </td> 

                     <td class="label_td2"> 
                      <%= IntranetAPI.CommunUtility.getRessourceEntry("lbEndDate", ressFilePath) %> : 
                     </td> 
                     <td style="font-size: 11px; text-align: left; width: 180px"> 
                      <%# Container.Resource.CustomFields[1].ToString().Split(' ')[0]%> 
                     </td> 
                    </tr> 
                    <tr> 
                     <td class="label_td2"> 
                      <%= IntranetAPI.CommunUtility.getRessourceEntry("lblSociete", ressFilePath) %> : 

                     </td> 
                     <td style="font-size: 11px; text-align: left; width: 180px"> 
                      <%# Container.Resource.CustomFields[2] %> 
                     </td> 
                     <td class="label_td2"> 
                      <%= DotNetNuke.Services.Localization.Localization.GetString("gwIsResponsible", ressFilePath)%> : 

                     </td> 
                     <td style="font-size: 11px; text-align: left; width: 180px"> 
                      <%# Container.Resource.CustomFields[4] %> 
                     </td> 
                    </tr> 

                    <tr> 

                     <td class="label_td3"> 
                      <%= DotNetNuke.Services.Localization.Localization.GetString("gvwAuditors", ressFilePath)%> : 
                     </td> 
                     <td style="font-size: 11px; text-align: left; width: 180px" colspan="3"> 
                      <%# Container.Resource.CustomFields[3] %> 
                     </td> 
                    </tr> 

                    <tr> 

                     <td class="label_td3"> 
                      <%= DotNetNuke.Services.Localization.Localization.GetString("tMenuAuditCategory", ressFilePath)%> : 
                     </td> 
                     <td style="font-size: 11px; text-align: left; width: 180px" colspan="3"> 
                      <%# Container.Resource.CustomFields[5] %> 
                     </td> 
                    </tr> 


                    <tr> 

                     <td class="label_td3"> 
                      <%= DotNetNuke.Services.Localization.Localization.GetString("TProcessusAudited", ressFilePath)%> : 
                     </td> 
                     <td style="font-size: 11px; text-align: left; width: 180px" colspan="3"> 
                      <%# Container.Resource.CustomFields[7] %> 
                     </td> 
                    </tr> 

                    <tr> 

                     <td class="label_td2"> 
                      <%= DotNetNuke.Services.Localization.Localization.GetString("hProjet", ressFilePath)%> : 
                     </td> 
                     <td style="font-size: 11px; text-align: left; width: 180px" colspan="3"> 
                      <%# Container.Resource.CustomFields[8] %> 
                     </td> 
                    </tr> 

                    <tr> 
                     <td></td> 
                    </tr> 
                    <tr> 
                     <td style="text-align: center" colspan="4"> 
                      <a href="RequirementNormManagement.ascx"> 
                       <%= DotNetNuke.Services.Localization.Localization.GetString("lblSeeMore", ressFilePath)%> 
                      </a> 
                     </td> 
                    </tr> 


                   </table> 
                  </HorizontalResourceHeaderTemplate> 
                 </Templates> 



                 <OptionsBehavior ShowViewSelector="true" /> 
                 <Storage EnableReminders="false" /> 
                </dx:ASPxScheduler> 

Ceci est mon serveur Code Side

protected void SchAuditProgram_CustomCallback(object sender, DevExpress.Web.CallbackEventArgsBase e) 
    { 
     if (grdAuditProgram.FocusedRowIndex == -1) 
      return; 

     var key = grdAuditProgram.GetRowValues(grdAuditProgram.FocusedRowIndex, "AuditProgramID"); 
     Session["AuditProgramID"] = key.ToString(); 
     SqlAuditByProgramDS.DataBind(); 
     SchAuditProgram.DataBind(); 
     SchAuditProgram.OptionsView.ShowOnlyResourceAppointments = true; 
    }