我在aspxscheduler下拉列表中显示的Resouces有问题: 当我选择一个程序时(从左边的网格中),aspx调度程序被回调,资源在调度程序中绑定,但资源下拉列表不可见。当我更改视图时,下拉列表将可见。
我认为问题是当aspxscheduler被回调时,下拉列表没有绑定。那么如何才能访问下拉列表?
谢谢,
答案 0 :(得分:0)
这是我的客户端代码
<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>
这是我的服务器端代码
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;
}