asp:DetailsView显示每页一个对象可以显示多个

时间:2014-01-24 16:13:40

标签: asp.net dataview

我有底部详细信息视图,它显示单行上的一个细节是否有任何方法可以使用我可以显示多个详细视图对象

<asp:DetailsView ID="DetailsView1"  runat="server" Height="50px" Width="125px" 
        AutoGenerateRows="False"  EnableViewState="False" 
        DataKeyNames="questionID" DataSourceID="AllQuestions" AllowPaging="True">
        <Fields>
            <asp:BoundField DataField="SubjectName" HeaderText="SubjectName" 
                SortExpression="SubjectName" />
            <asp:BoundField DataField="Chapter" HeaderText="Chapter" 
                SortExpression="Chapter" />
            <asp:BoundField DataField="Section" HeaderText="Section" 
                SortExpression="Section" />
            <asp:BoundField DataField="questionID" HeaderText="questionID" 
                InsertVisible="False" ReadOnly="True" SortExpression="questionID" />
            <asp:BoundField DataField="name" HeaderText="name" SortExpression="name" />
            <asp:BoundField DataField="sectionID" HeaderText="sectionID" 
                SortExpression="sectionID" />
            <asp:BoundField DataField="QuestionNo" HeaderText="QuestionNo" 
                SortExpression="QuestionNo" />
            <asp:BoundField DataField="question" HeaderText="question" 
                SortExpression="question" />
            <asp:BoundField DataField="A" HeaderText="A" SortExpression="A" />
            <asp:BoundField DataField="B" HeaderText="B" SortExpression="B" />
            <asp:BoundField DataField="C" HeaderText="C" SortExpression="C" />
            <asp:BoundField DataField="D" HeaderText="D" SortExpression="D" />
            <asp:BoundField DataField="correctAnswer" HeaderText="correctAnswer" 
                SortExpression="correctAnswer" />
            <asp:BoundField DataField="explanation" HeaderText="explanation" 
                SortExpression="explanation" />
        </Fields>
    </asp:DetailsView>

1 个答案:

答案 0 :(得分:0)

不是我知道.... DetailsView适用于单个记录。将GridView或Repeater或ListView用于多个记录。