My Linux Stuff - Complete Blog For Linux Articles

My Linux Stuff - Complete Blog For Linux Articles

A Website For Complete Linux OS,Step by Step linux Installtion, Linux Tips and Tricks and Linux Stuff and so on... Connect and sharing here....

TOP 50 ENGINEERING COLLEGES IN INDIA 2014

TOP 50 ENGINEERING COLLEGES IN INDIA 2014

This below survey was taken many form many colleges in India. These Top 50 Engineering Colleges in India have Good Infrastructure, Good Environment, Educations , Staff, Placement , Research Activities and other Facilities are good.

Top 10 Government Engineering Colleges in India

Top 10 Government Engineering Colleges in India

These Government Engineering Colleges in India are really good for all kind of stuff like Education , research , Placement and New Innovation Ideas etc... But Getting seat in these colleges are heavy competition in students .....

Top 10 Colleges In India 2014

Top 10 Colleges In India 2014

Indian Institute Of Technology Delhi,Indian Institute Of Technology Bombay,Indian Institute Of Technology Kanpur,Indian Institute Of Technology Madras,Indian Institute Of Technology Kharagpur,Indian Institute Of Technology Roorkee,University Of Delhi,Indian Institute Of Technology Guwahati,University Of Calcutta,University Of Mumbai, National Institute Of Technology,Trichy.

2014 LATEST SURVEY TOP RANKING ENGINEERING COLLEGES IN INDIA

2014 LATEST SURVEY TOP RANKING ENGINEERING COLLEGES IN INDIA

This below survey was taken many form many colleges in India. These Top 100 Engineering Colleges in India have Good Infrastructure, Good Environment, Educations , Staff, Placement , Research Activities and other Facilities are good. If you want to do Engineering as your dream and try out these colleges

Subscribe Now!

Enter your email address:

Friday, October 22, 2010

Pagging In asp.net c#

How To Use Pagging In asp.net c#

In ASPX Page:
                                        PageSize="5" AutoGenerateColumns="false" EmptyDataText="No Result Found" Width="100%"
                                        OnRowCommand="gvVendor_RowCommand" OnSorting="grdView_OnSorting" OnRowDataBound="gvResults_RowDataBound"
                                        CellPadding="4" AllowPaging="true" OnPageIndexChanging="gridView_PageIndexChanging">


Incode Behind :

protected void gridView_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        gvVendor.PageIndex = e.NewPageIndex;
        gvVendor.DataSource = Binddata();
        gvVendor.DataBind();
        gvVendor.PageSize = 10;
    }


Pagging In asp.net c#

Sorting GridView Columns Manually in Asp.net and c#

private const string ASCENDING = " ASC";
 
private const string DESCENDING = " DESC";
 public SortDirection GridViewSortDirection
    {
        
get
        
{
            
if (ViewState["sortDirection"] == null)
                ViewState["sortDirection"] = SortDirection.Ascending;

            
return (SortDirection) ViewState["sortDirection"];              
        }
        
set { ViewState["sortDirection"] = value; }
    }


    
protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)
    {
        
string sortExpression = e.SortExpression;

        
if (GridViewSortDirection == SortDirection.Ascending)
        {
            GridViewSortDirection = SortDirection.Descending;
            SortGridView(sortExpression, DESCENDING);
        }
        
else
        
{
            GridViewSortDirection = SortDirection.Ascending;
            SortGridView(sortExpression, ASCENDING);
        } 
     
    }

    
private void SortGridView(string sortExpression,string direction)
    {
        
//  You can cache the DataTable for improving performance
        
DataTable dt = GetData().Tables[0];

        DataView dv = 
new DataView(dt);
        dv.Sort = sortExpression + direction;       

        GridView1.DataSource = dv;
        GridView1.DataBind();       
    }


Sorting GridView Columns Manually in Asp.net and c#

Related Posts Plugin for WordPress, Blogger...