@Html.DataGrid(new DataGridOptions
{
Columns = new List()
{
new CheckBoxFieldColumn{ HeaderText="", FieldName="CoursematerialID" },
new LinkButtonColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Handle="edit", Width=0.06 },
new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.1, OverflowLength=15 },
new BoundFieldColumn { FieldName="Abbreviation", HeaderText="课程简称", Align=AlignStyle.Center, Width=0.08, OverflowLength=10 },
new BoundFieldColumn { FieldName="CourseLevelName", HeaderText="课程级别", Align=AlignStyle.Center, OrderFieldName="CourseLevelID", Width=0.04 },
new BoundFieldColumn { FieldName="CourseScienceName", HeaderText="课程科类", Align=AlignStyle.Center, OrderFieldName="CourseScienceID", Width=0.04 },
new BoundFieldColumn { FieldName="ClassName", HeaderText="上课类型", Align=AlignStyle.Center, Width=0.04, CustomFormatFun="SetRedColumn" },
new BoundFieldColumn { FieldName="IsEnableName", HeaderText="是否启用", Align=AlignStyle.Center, OrderFieldName="IsEnable", Width=0.04, CustomFormatFun="SetRedColumn" }
},
CustomerRowStyleFun = "SetRedGrid",
IsPostBack = true,
IsCheckOnSelect = true,
DataSourceUrl = Url.Content("~/ClubCourse/CourseNoClubList"),
ID = "dgCourseNoClubList",
IsPagination = true,
IsShowRowNumbers = true,
IsSingleSelect = false
})
|