gpt4 book ai didi

c# - 如何旋转可编辑网格的行?

转载 作者:太空宇宙 更新时间:2023-11-03 16:14:20 25 4
gpt4 key购买 nike

我需要能够在可编辑网格中输入数据,其中动态列由查找表中的行数决定。这不是实际的例子,但它是我正在尝试做的一个类似的简单案例:

public class Student {
public long ID {get; set;}
public string FirstName {get; set;}
public string LastName {get; set;}
...
}

public class Assessment {
public long ID {get; set;}
...
}

public class AssessmentQuestion {
public long ID {get; set;}
public long AssessmentID {get; set;}
public int QuestionNo {get; set;}
public int PointValue {get; set;}
...
}

public class StudentAssessment {
public long ID {get; set;}
public long StudentID {get; set;}
public long AssessmentID {get; set;}
...
}

public class StudentAssessmentAnswer {
public long ID {get; set;}
public long StudentAssessmentID {get; set;}
public long AssessmentQuestionID {get; set;}
public int PointsAwarded {get; set;}
public string Comments {get; set;}
...
}

根据上述结构,学生可以参加给定的评估。我们可以创建 Assessment、AssessmentQuestion、Student 和 StudentAssessment 数据。现在用户正在对评估进行评分,她想查看所有试卷并输入每个学生每个问题的分数。因此,为了最大程度地方便使用,评分者应该看到一个可编辑的网格,每行一个学生姓名,每个问题都有一列,并且他们可以通过 tab 键浏览所有单元格,为每个问题输入要点和评论(如果有)。然后,在点击“保存”时,应该填充 StudentAssessmentAnswer 表。当然,read应该是outer join,因为即使student assessment和question之间没有StudentAssessmentAnswer join,我们还是要入点。

那么,当列数取决于此 AssessmentID 的 AssessmentQuestion 表中的行数时,如何制作这样的网格?

最佳答案

有几种商业上可用的网格可以做到这一点(某种程度上),即。 Telerik MVC grid :

enter image description here

关于c# - 如何旋转可编辑网格的行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16168970/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com