How do I get Gridview to render THEAD?

前端 未结 8 931
鱼传尺愫
鱼传尺愫 2020-12-04 10:12

How do I get the GridView control to render the tags? I know .UseAccessibleHeaders makes it p

8条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-04 10:43

    I use this in OnRowDataBound event:

    protected void GridViewResults_OnRowDataBound(object sender, GridViewRowEventArgs e) {
        if (e.Row.RowType == DataControlRowType.Header) {
            e.Row.TableSection = TableRowSection.TableHeader;
        }
    }
    

提交回复
热议问题