Solutionsforyou

  • Home
  • Business
    • Internet
    • Market
    • Stock
  • Parent Category
    • Child Category 1
      • Sub Child Category 1
      • Sub Child Category 2
      • Sub Child Category 3
    • Child Category 2
    • Child Category 3
    • Child Category 4
  • Featured
  • Health
    • Childcare
    • Doctors
  • Home
  • Database
    • MSSQL
    • Market
    • Stock
  • Downloads
    • Dvd
    • Games
    • Software
      • Office
  • Parent Category
    • Child Category 1
      • Sub Child Category 1
      • Sub Child Category 2
      • Sub Child Category 3
    • Child Category 2
    • Child Category 3
    • Child Category 4
  • Featured
  • Health
    • Childcare
    • Doctors
  • Uncategorized

Wednesday, 14 September 2016

Data table Class Table Shorting

 Unknown     05:59     No comments   

 protected void GridView1_PreRender(object sender, EventArgs e)
    {
        dtInv = objDataAccess.GetDataTable("select * from tbl_fin_Customerregistration");
        GridView1.DataSource = dtInv;  //GetData is your method that you will use to obtain the data you're populating the GridView with

        GridView1.DataBind();

        if (GridView1.Rows.Count > 0)
        {
            //Replace the <td> with <th> and adds the scope attribute
            GridView1.UseAccessibleHeader = true;

            //Adds the <thead> and <tbody> elements required for DataTables to work
            GridView1.HeaderRow.TableSection = TableRowSection.TableHeader;

            //Adds the <tfoot> element required for DataTables to work
            GridView1.FooterRow.TableSection = TableRowSection.TableFooter;
        }

    }


                        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="true" width="100%" CssClass="table table-striped table-bordered table-hover gvv" OnPreRender="GridView1_PreRender" >
                        </asp:GridView>





 <script language="javascript" type="text/jscript">
        $(document).ready(function () {
            $('#dataTables-example').DataTable({
                responsive: true,
                "lengthMenu": [[10, 25, 50, 100, 500, 1000, 1000000], [10, 25, 50, 100, 500, 1000, "All"]]
            });
        });
        $(document).ready(function () {
            $('.gvv').DataTable({
                responsive: true,
            "lengthMenu": [[10, 25, 50, 100, 500, 1000, 1000000], [10, 25, 50, 100, 500, 1000, "All"]]
            });
        });
    </script>
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Email ThisBlogThis!Share to XShare to Facebook
Newer Post Older Post Home

0 comments:

Post a Comment

Popular Posts

  • (no title)
        SqlCommand cmd;     static string connString =     System.Web.Configuration.WebConfigurationManager.ConnectionStrings["conn"]...
  • List Spand
    <script>      $(function () {           var pgurl = window.location.href.substr(window.location.href.lastIndexOf("/") + 1);...
  • Design
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd...
  • How we get table structure from database
    CREATE procedure dbo.Gettable    @tablename nvarchar(100)  as        DECLARE              @object_name SYSNAME  ,               @object_id ...
  • Dashboard
    https://startbootstrap.com/template-overviews/sb-admin-2/
  • Data table Class Table Shorting
     protected void GridView1_PreRender(object sender, EventArgs e)     {         dtInv = objDataAccess.GetDataTable("select * from tbl_fi...
  • hii
    hiii

Recent Posts

Categories

  • sql

Pages

  • Home

Blog Archive

  • ►  2017 (2)
    • ►  February (2)
  • ▼  2016 (5)
    • ▼  September (3)
      •     SqlCommand cmd;    static string connString =...
      • Data table Class Table Shorting
      • List Spand
    • ►  August (1)
    • ►  June (1)

About Me

Unknown
View my complete profile
Powered by Blogger.

Sample Text

Copyright © Solutionsforyou | Powered by Blogger
Design by Hardeep Asrani | Blogger Theme by NewBloggerThemes.com | Distributed By Gooyaabi Templates