RadScheduler 问题
问: 我使用 Telerik RadScheduler 处理来自两个表的数据:
- Course (courseCode,CourseTitle)
- CourseTime(id,from,to,courseCode), id 自动递增
在调度程序背后的代码中绑定到 ObjectDataSource:
rs.DataSourceID = ObjectDataSource1.ID;
rs.DataKeyField = "id";
rs.DataStartField = "from";
rs.DataEndField = "to";
rs.DataSubjectField = "courseTitle";
rs.DataBind();
更新课程时我想更新其名称。为此,我需要访问 courseCode。 ObjectDataSource1 包含 courseCode,但我不知道如何将其绑定到 Scheduler 控件。
插入新课程时,我希望在编辑弹出表单中包含一个下拉列表,其中包含课程表中的课程列表。
我查看了 Telerik 时间表示例和演示,但我不明白整个想法。 如果有一个简单的代码示例,展示如何将更多数据绑定到调度程序约会,以及如何向编辑表单添加新控件,我们将不胜感激。
Q:
I'm using Telerik RadScheduler with data from two tables:
- Course (courseCode,CourseTitle)
- CourseTime(id,from,to,courseCode),the id is auto incremented
In the codebehind the Scheduler is bound to an ObjectDataSource:
rs.DataSourceID = ObjectDataSource1.ID;
rs.DataKeyField = "id";
rs.DataStartField = "from";
rs.DataEndField = "to";
rs.DataSubjectField = "courseTitle";
rs.DataBind();
When updating a course I want to update its name. For this I need to access the courseCode. The ObjectDataSource1 contains the courseCode, but I don't know how to bind it to the Scheduler control.
When inserting a new course I want to have a dropdownlist in the edit popup form, with a list of courses from the Course table.
I looked at the Telerik schedule samples and demos but i didn't understand the whole idea.
It would appreciate a simple code example showing how to bind more data to Scheduler appointments, and how to add new controls to the edit form.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您将需要模板化高级(编辑)表单。这样做相当容易,因为有现成的模板可以修改以满足您的要求。我建议您查看以下演示了解详情。
You will need to template the Advanced(Edit)Form. It is rather easy to do so, since there are out of the box templates that can be modified to fit your requirements. I suggest that you take a look at the following demo for details.