Asp.net Gridview MakeAccessible and OnPreRender and RowDataBound

      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");
            }
        }

Search This Blog

Arsip Blog

Powered by Blogger.

Recent

Comment

Author Info

Like This Theme

Popular Posts

Video Of Day

jishnukanat@gmail.com

Sponsor

Most Popular