public static void MakeAccessible(GridView grid)
{
if (grid.Rows.Count <= 0) return;
grid.UseAccessibleHeader = true;
grid.HeaderRow.TableSection = TableRowSection.TableHeader;
if (grid.ShowFooter)
grid.FooterRow.TableSection = TableRowSection.TableFooter;
}
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
MakeAccessible(recentgrid);
}
protected void recentgrid_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Header)
{
e.Row.Cells[0].Attributes.Add("data-class", "expand");
e.Row.Cells[3].Attributes.Add("data-hide", "phone,tablet");
e.Row.Cells[4].Attributes.Add("data-hide", "phone,tablet");
e.Row.Cells[2].Attributes.Add("data-hide", "phone");
}
}
{
if (grid.Rows.Count <= 0) return;
grid.UseAccessibleHeader = true;
grid.HeaderRow.TableSection = TableRowSection.TableHeader;
if (grid.ShowFooter)
grid.FooterRow.TableSection = TableRowSection.TableFooter;
}
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
MakeAccessible(recentgrid);
}
protected void recentgrid_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Header)
{
e.Row.Cells[0].Attributes.Add("data-class", "expand");
e.Row.Cells[3].Attributes.Add("data-hide", "phone,tablet");
e.Row.Cells[4].Attributes.Add("data-hide", "phone,tablet");
e.Row.Cells[2].Attributes.Add("data-hide", "phone");
}
}