WebGrid.Table 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回用于呈现实例的 WebGrid HTML 标记。
public System.Web.IHtmlString Table (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, Func<dynamic,object> footer = default, object htmlAttributes = default);
member this.Table : string * string * string * string * string * string * string * bool * bool * string * seq<System.Web.Helpers.WebGridColumn> * seq<string> * Func<obj, obj> * obj -> System.Web.IHtmlString
Public Function Table (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 footer As Func(Of Object, Object) = null, 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>
一个集合,其中包含在网格自动填充列时要排除的数据列的名称。
返回
表示完全填充 WebGrid 实例的 HTML 标记。