开发者

how to dynamically change telerik's radgrid specific column dynamically?

开发者 https://www.devze.com 2022-12-21 22:47 出处:网络
we have the datasource as : rgSubjects.DataSource = entity.Student_Subject_MM.Include(\"Subjects\"). Where(p => p.StudentID == _currentStudent.StudentID

we have the datasource as :

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.S开发者_高级运维ubject.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();

How can we change the sizes per column using code-behind in c#.net? thanks a lot.


Does setting the Width property of your columns makes sense? Check out this article about how to operate with auto-generated and declarative columns

0

精彩评论

暂无评论...
验证码 换一张
取 消