如何动态地动态更改telerik的radgrid特定列?

时间:2010-03-06 09:06:42

标签: telerik radgrid

我们将数据源设为:

rgSubjects.DataSource = entity.Student_Subject_MM.Include("Subjects").
        Where(p => p.StudentID == _currentStudent.StudentID
            && (p.Subject.SchoolYear == schoolyear || schoolyear == "0")
            && (p.Subject.Semester.Value == sem || sem == 0)
            && (p.Subject.SubjectCode.Contains(searchSubject) || p.Subject.Description.Contains(searchSubject) || p.Subject.Title.Contains(searchSubject))
        ).Select(p => new {
            SubjectCode = p.Subject.SubjectCode.Trim(),
            Description = p.Subject.Description.Trim(),
            Schedule = p.Subject.Schedule.Trim(),
            Room = p.Subject.Room.Trim(),
            Instructor = p.Subject.Instructor.LastName + ", " + p.Subject.Instructor.FirstName,
            Grade = p.Grade,
            Remarks = p.Remarks
        });
rgSubjects.DataBind();

如何在c#.net中使用代码隐藏更改每列的大小?非常感谢。

1 个答案:

答案 0 :(得分:0)

设置列的Width属性是否有意义?查看this article有关如何使用自动生成和声明性列

的信息