我们将数据源设为:
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中使用代码隐藏更改每列的大小?非常感谢。