资源未被“选择”;在 Telerik Scheduler 编辑对话框中
我已经在时间线视图上实现了 Telerik 调度程序。我允许我的 y 轴资源(倡导者)和会议之间存在 M:M 关系。我的调度程序如下所示:
当我双击会议的一个实例时,高级编辑对话框出现。但是,在这里,没有任何倡导者被选为会议参与者:
有一个时间线中出现本次会议的倡导者人数。为什么它们没有在编辑表单中显示为选中状态?
问题还不止于此。我有第二种类型的资源(立法者),它也与会议具有 M:M 关系。这里有一个类似的问题 - 我为这次会议和 4 位立法者定义了关系,但只检查了第一位立法者(其他三个保持未检查):
我需要添加两种其他类型的资源(同样,每种资源都是 M:M 与会议),并且我预计我会遇到与我的两个资源类似的问题有已经添加了。
我已经能够通过更改调度程序的分组并通过 SQL 查询来直观地验证数据库中的关系是否有效。那么,为什么我看不到这些相关资源的检查情况呢?我的调度程序代码如下:
<telerik:RadScheduler runat="server" ID="RadScheduler1"
AdvancedForm-Enabled="true"
AllowEdit="true"
AllowInsert="true"
DataEndField="End"
DataKeyField="ID"
DataSourceID="EventsDataSource"
DataStartField="Start"
DataSubjectField="Subject"
DayEndTime="17:00:00"
DayStartTime="07:00:00"
EnableAdvancedForm="true"
Localization-HeaderMultiDay="Work Week"
OverflowBehavior="Expand"
OnAppointmentDelete="OnAppointmentDelete"
OnAppointmentInsert="OnAppointmentInsert"
OnAppointmentUpdate="OnAppointmentEdited"
OnNavigationComplete="RadScheduler1_NavigationComplete"
SelectedDate="9/20/2011"
SelectedView="TimelineView"
>
<AppointmentContextMenuSettings EnableDefault="true" />
<AdvancedForm Modal="true" />
<ResourceTypes>
<telerik:ResourceType KeyField="Adv_AdvocateID" AllowMultipleValues="true" Name="Advocate" TextField="Adv_FullName" ForeignKeyField="Adv_AdvocateID"
DataSourceID="AdvocatesDataSource" />
</ResourceTypes>
<ResourceTypes>
<telerik:ResourceType KeyField="Leg_LegID" Name="Legislator" AllowMultipleValues="true" TextField="Leg_FullName" ForeignKeyField="Leg_LegID"
DataSourceID="LegislatorsDataSource" />
</ResourceTypes>
<TimelineView UserSelectable="true" GroupBy="Advocate" GroupingDirection="Vertical" />
<MultiDayView UserSelectable="false" />
<DayView UserSelectable="false" />
<WeekView UserSelectable="false" />
<MonthView UserSelectable="false" />
</telerik:RadScheduler>
我希望有人能够深入了解如何在编辑约会对话框中正确显示所选资源,我提前感谢您的帮助。
I've implemented Telerik scheduler on timeline view. I am allowing a M:M relationship between my y-axis resource (advocates) and Meetings. Here is what my scheduler looks like:
When I double click one of the instances of the meeting, the advanced edit dialog appears. However, in here, none of the advocates are selected as participants in the meeting:
There are a number of advocates for whom this meeting appears in the timeline. Why do they not get displayed as selected in the edit form?
The problem doesn't end there. I have a second type of resources (legislators) that also has a M:M relationship with Meetings. There is a similar problem here - I have relationships defined for this meeting and 4 legislators, but only the first legislator is checked (and the other three remain unckecked):
I need to add two other types of resources (again, each will be M:M with Meetings), and I expect that I will have a similar problem to the two I have already added.
I have been able to verify visually by changing the grouping of my scheduler and through SQL queries that the relationships in the database are valid. So, why am I unable to see each of these related resources checked? My scheduler code is as follows:
<telerik:RadScheduler runat="server" ID="RadScheduler1"
AdvancedForm-Enabled="true"
AllowEdit="true"
AllowInsert="true"
DataEndField="End"
DataKeyField="ID"
DataSourceID="EventsDataSource"
DataStartField="Start"
DataSubjectField="Subject"
DayEndTime="17:00:00"
DayStartTime="07:00:00"
EnableAdvancedForm="true"
Localization-HeaderMultiDay="Work Week"
OverflowBehavior="Expand"
OnAppointmentDelete="OnAppointmentDelete"
OnAppointmentInsert="OnAppointmentInsert"
OnAppointmentUpdate="OnAppointmentEdited"
OnNavigationComplete="RadScheduler1_NavigationComplete"
SelectedDate="9/20/2011"
SelectedView="TimelineView"
>
<AppointmentContextMenuSettings EnableDefault="true" />
<AdvancedForm Modal="true" />
<ResourceTypes>
<telerik:ResourceType KeyField="Adv_AdvocateID" AllowMultipleValues="true" Name="Advocate" TextField="Adv_FullName" ForeignKeyField="Adv_AdvocateID"
DataSourceID="AdvocatesDataSource" />
</ResourceTypes>
<ResourceTypes>
<telerik:ResourceType KeyField="Leg_LegID" Name="Legislator" AllowMultipleValues="true" TextField="Leg_FullName" ForeignKeyField="Leg_LegID"
DataSourceID="LegislatorsDataSource" />
</ResourceTypes>
<TimelineView UserSelectable="true" GroupBy="Advocate" GroupingDirection="Vertical" />
<MultiDayView UserSelectable="false" />
<DayView UserSelectable="false" />
<WeekView UserSelectable="false" />
<MonthView UserSelectable="false" />
</telerik:RadScheduler>
I'm hoping someone can shed some insight into how to correctly display the selected resources in the edit appointment dialog, and I thank you in advance for your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我早些时候看过你刚刚找到的那个表格,这就是促使我问这个问题的原因。下面的方法似乎是我最关注的方法,因为它们似乎负责复选框的填充和每个条目的检查。
问题是,您现在拥有的很好,您只需将复选框控件替换到代码中,而不是像他们那样创建一个。
编辑:我浏览了 编程来查看按顺序调用的内容,以便您可以相应地调整它们以适合您的数据。
我认为通过页面加载的代码不会在您的代码中使用,您只需要调用条件 if 语句内的方法即可。
I was looking at that form earlier, the one you just found, which is what prompted me to ask. The methods below seem to be the ones I'm focusing on the most as it would seem they are responsible for the population of the check box and the checking of each entry.
The thing is, what you have now is good, you would just have to substitute your checkbox control into the code rather than create one like they do.
EDIT: I went through the Program to see what gets called in order, so that you may adjust them accordingly to fit your data.
I'd think the code via the page load wouldn't be used in yours, you would just need to call the methods inside the conditional if statement.