여러 개의 열이있는 GridView가 있는데 원하는대로 채울 수 있지만 그 중 하나의 열에는 많은 텍스트가 포함될 수 있습니다. 시도하고 멋지게 그것을 제시하기 위해 내가 그렇게 모든 컬럼에 걸쳐 스팬 그 아래 행에 해당 열을 보여줄 수 있기를 원합니다 :긴 텍스트가있는 GridView 열
간단한 예를 들어를 현재 내가 가진 :
Name DOB Sex Comments Title
Ian 15/04/2015 M This is MR
the text
that keeps
wrapping
나 ' d가 좋아하는 것 같습니다.
Name DOB Sex Comments Title
Ian 15/04/2015 M This is MR
Comments: This is the text that keeps wrapping
분명히 이것은 매우 단순화 된 예제이지만 잘하면 내가하려는 것을 설명합니다. 내가 가지고있는 현재 GridView 코드는 다음과 같습니다. intScore
을 다음 행으로 옮기고 싶습니다.
<asp:GridView ID="gvwClinical" runat="server" DataKeyNames="intClinicalAssessID" OnRowDataBound="gvwGrids_RowBound" OnRowDeleting="gvwGrids_Delete" OnSelectedIndexChanging="gvwClinical_SelectedIndexChanged" OnSorting="gvwSort" OnPageIndexChanging="gvwPage">
<Columns>
<asp:BoundField Visible="False" DataField="intClinicalAssessID"></asp:BoundField>
<asp:ButtonField Text="View" CommandName="Select" ButtonType="image"></asp:ButtonField>
<asp:ButtonField Text="Delete" CommandName="Delete" ButtonType="image"></asp:ButtonField>
<asp:BoundField DataField="dteAssessmentDate" HeaderText="Assess. Date" SortExpression="dteAssessmentDate"></asp:BoundField>
<asp:BoundField DataField="intScores" HeaderText="Scores" SortExpression="intScores" HtmlEncode="false"></asp:BoundField>
<asp:BoundField DataField="intHeight" HeaderText="Height" SortExpression="intHeight"></asp:BoundField>
<asp:BoundField DataField="intWeight" HeaderText="Weight" SortExpression="intWeight"></asp:BoundField>
<asp:BoundField DataField="strWellBeing" HeaderText="Gen Well Being" SortExpression="strWellBeing"></asp:BoundField>
<asp:BoundField DataField="strAbdominalPain" HeaderText="Abdo Pain" SortExpression="strAbdominalPain"></asp:BoundField>
<asp:BoundField DataField="strAbdominalMass" HeaderText="Abdo Mass" SortExpression="strAbdominalMass"></asp:BoundField>
<asp:BoundField DataField="strBowelFreqDay" HeaderText="Bowel Freq (day)" SortExpression="strBowelFreqDay"></asp:BoundField>
<asp:BoundField DataField="strBowelFreqNight" HeaderText="Bowel Freq (night)" SortExpression="strBowelFreqNight"></asp:BoundField>
<asp:BoundField DataField="strStoolUrgency" HeaderText="Defecation Urgency" SortExpression="strStoolUrgency"></asp:BoundField>
<asp:BoundField DataField="intLiquidStoolCount" HeaderText="Lq Stools 24 Hrs" SortExpression="intLiquidStoolCount"></asp:BoundField>
<asp:BoundField DataField="strRectalBleeding" HeaderText="Rectal Bleeding" SortExpression="strRectalBleeding"></asp:BoundField>
<asp:BoundField DataField="strEndoscopyFindings" HeaderText="Endo Findings" SortExpression="strEndoscopyFindings"></asp:BoundField>
<asp:BoundField DataField="strGlobalAssess" HeaderText="Gbl Assessment" SortExpression="strGlobalAssess"></asp:BoundField>
<asp:BoundField DataField="intActiveFistula" HeaderText="Active Fistula" SortExpression="intActiveFistula"></asp:BoundField>
<asp:BoundField DataField="intTemperature" HeaderText="Temp." SortExpression="intTemperature"></asp:BoundField>
<asp:BoundField DataField="intPulse" HeaderText="Pulse" SortExpression="intPulse"></asp:BoundField>
<asp:BoundField DataField="intHB" HeaderText="Hb" SortExpression="intHB"></asp:BoundField>
<asp:BoundField DataField="intHCT" HeaderText="Hct" SortExpression="intHCT"></asp:BoundField>
<asp:BoundField DataField="intCRP" HeaderText="CRP" SortExpression="intCRP"></asp:BoundField>
<asp:BoundField DataField="strComplications" HeaderText="Complications" SortExpression="strComplications"></asp:BoundField>
</Columns>
</asp:GridView>
이 방법에는 '반복기'를 사용하십시오. – Bharadwaj
Bharadwaj가 이러한 종류의 목적을 위해 리피터를 사용한다고 말한 것처럼. Gridview에서 이런 종류의 기능을 성취하기는 매우 어려우며 불필요한 코드를 작성해야합니다. 리피터를 사용하면 쉽게 이러한 것을 만들 수 있습니다. –
네, Bharadwaj도 동의합니다. – Ravimallya