다음을 통해 공유


WebGrid.GetHtml 메서드

정의

지정된 페이징 옵션을 사용하여 instance 렌더링 WebGrid 하는 데 사용되는 HTML 태그를 반환합니다.

public System.Web.IHtmlString GetHtml(string tableStyle = default, string headerStyle = default, string footerStyle = default, string rowStyle = default, string alternatingRowStyle = default, string selectedRowStyle = default, string caption = default, bool displayHeader = true, bool fillEmptyRows = false, string emptyRowCellValue = default, System.Collections.Generic.IEnumerable<System.Web.Helpers.WebGridColumn> columns = default, System.Collections.Generic.IEnumerable<string> exclusions = default, System.Web.Helpers.WebGridPagerModes mode = System.Web.Helpers.WebGridPagerModes.NextPrevious | System.Web.Helpers.WebGridPagerModes.Numeric, string firstText = default, string previousText = default, string nextText = default, string lastText = default, int numericLinksCount = 5, object htmlAttributes = default);
member this.GetHtml : string * string * string * string * string * string * string * bool * bool * string * seq<System.Web.Helpers.WebGridColumn> * seq<string> * System.Web.Helpers.WebGridPagerModes * string * string * string * string * int * obj -> System.Web.IHtmlString
Public Function GetHtml (Optional tableStyle As String = null, Optional headerStyle As String = null, Optional footerStyle As String = null, Optional rowStyle As String = null, Optional alternatingRowStyle As String = null, Optional selectedRowStyle As String = null, Optional caption As String = null, Optional displayHeader As Boolean = true, Optional fillEmptyRows As Boolean = false, Optional emptyRowCellValue As String = null, Optional columns As IEnumerable(Of WebGridColumn) = null, Optional exclusions As IEnumerable(Of String) = null, Optional mode As WebGridPagerModes = System.Web.Helpers.WebGridPagerModes.NextPrevious | System.Web.Helpers.WebGridPagerModes.Numeric, Optional firstText As String = null, Optional previousText As String = null, Optional nextText As String = null, Optional lastText As String = null, Optional numericLinksCount As Integer = 5, Optional htmlAttributes As Object = null) As IHtmlString

매개 변수

tableStyle
String

전체 테이블의 스타일을 지정하는 데 사용되는 CSS 클래스의 이름입니다.

headerStyle
String

테이블 머리글의 스타일을 지정하는 데 사용되는 CSS 클래스의 이름입니다.

footerStyle
String

테이블 바닥글의 스타일을 지정하는 데 사용되는 CSS 클래스의 이름입니다.

rowStyle
String

각 테이블 행의 스타일을 지정하는 데 사용되는 CSS 클래스의 이름입니다.

alternatingRowStyle
String

짝수 테이블 행의 스타일을 지정하는 데 사용되는 CSS 클래스의 이름입니다.

selectedRowStyle
String

선택된 테이블 행의 스타일을 지정하는 데 사용되는 CSS 클래스의 이름입니다. 이때 한 번에 하나의 행만 선택할 수 있습니다.

caption
String

표 캡션입니다.

displayHeader
Boolean

true이면 테이블 머리글이 표시됩니다. 그렇지 않으면 false입니다. 기본값은 true입니다.

fillEmptyRows
Boolean

true이면 마지막 페이지를 채울 데이터 항목이 부족한 경우 마지막 페이지에 추가 행을 삽입합니다. 그렇지 않으면 false입니다. 기본값은 false입니다. 매개 변수로 지정된 텍스트를 사용하여 추가 행이 emptyRowCellValue 채워집니다.

emptyRowCellValue
String

데이터 항목이 마지막 페이지를 채우기에 부족한 경우 페이지에 추가 행을 채우는 데 사용되는 텍스트입니다. fillEmptyRows 이러한 추가 행을 표시하려면 매개 변수를 true로 설정해야 합니다.

columns
IEnumerable<WebGridColumn>

각 열이 WebGridColumn 표시되는 방식을 지정하는 인스턴스의 컬렉션입니다. 여기에는 각 표의 열과 연관된 데이터 열 및 각 표의 열을 포함하는 데이터 값의 형식을 지정하는 방법이 포함됩니다.

exclusions
IEnumerable<String>

표에서 열을 자동으로 채울 때 제외할 데이터 열의 이름을 포함하는 컬렉션입니다.

mode
WebGridPagerModes

instance 페이지 간 이동을 위해 제공되는 메서드를 지정하는 열거형 값의 WebGrid 비트 조합입니다.

firstText
String

instance 첫 번째 페이지에 연결하는 데 사용되는 HTML 링크 요소의 WebGrid 텍스트입니다. 이 FirstLast 페이지 탐색 요소를 표시하려면 매개 변수의 mode 플래그를 설정해야 합니다.

previousText
String

instance 이전 페이지에 연결하는 데 사용되는 HTML 링크 요소의 WebGrid 텍스트입니다. 이 NextPrevious 페이지 탐색 요소를 표시하려면 매개 변수의 mode 플래그를 설정해야 합니다.

nextText
String

instance 다음 페이지에 연결하는 데 사용되는 HTML 링크 요소의 WebGrid 텍스트입니다. 이 NextPrevious 페이지 탐색 요소를 표시하려면 매개 변수의 mode 플래그를 설정해야 합니다.

lastText
String

instance 마지막 페이지에 연결하는 데 사용되는 HTML 링크 요소의 WebGrid 텍스트입니다. 이 FirstLast 페이지 탐색 요소를 표시하려면 매개 변수의 mode 플래그를 설정해야 합니다.

numericLinksCount
Int32

주변 WebGrid 페이지에 제공되는 숫자 페이지 링크 수입니다. 페이지 번호를 포함하는 각 숫자 페이지 링크의 텍스트입니다. Numeric 이러한 페이지 탐색 요소를 표시하려면 매개 변수의 mode 플래그를 설정해야 합니다.

htmlAttributes
Object

instance 나타내는 HTML 테이블 요소에 대해 설정할 특성(이름 및 값)의 컬렉션을 나타내는 개체입니다 WebGrid .

반환

완전히 채워진 WebGrid instance 나타내는 HTML 태그입니다.

적용 대상