You have to set AllowPaging=true property of GridView.
public void bingdrid()
{
cmd.Connection = con;
cmd.CommandText = "SELECT Customer.* , convert(varchar(50),StarteTime,103),convert(varchar(50),EndTime,103), CompanyMaster.Name, Country.CountryName, City.CityName, State.StateName " +
"FROM Customer INNER JOIN "+
" CompanyMaster ON Customer.CompanyID = CompanyMaster.CompanyID INNER JOIN "+
" City ON Customer.CityID = City.CityID INNER JOIN "+
"Country ON Customer.CountryID = Country.CountryID INNER JOIN "+
"State ON Customer.StateID = State.StateID AND City.StateID = State.StateID AND Country.CountryID = State.CountryID ";
DataTable ds=new DataTable();
da.SelectCommand = cmd ;
da.Fill(ds);
grvCusto.DataSource = ds;
grvCusto.DataBind();
} __avd
Posting Genius (adatapost)
Moderator
8,648 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241