This is a migrated thread and some comments may be shown as answers.

Paging in gird view

1 Answer 53 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Azees
Top achievements
Rank 1
Azees asked on 06 Sep 2008, 04:45 AM
hi

   i am using telerik grid view in my wep application...using c#
   in my application i have set one option for user can select page size 
   in tht grid view using compo box

protected void DDL_SelectedIndexChanged(object sender, EventArgs e)

{

string PerPage = DDL.SelectedItem.Text;

switch (PerPage)

{

case "3":

{

grdWantList.PageSize = 3;

BindWantedList();

break;

}

case "15":

{

grdWantList.PageSize = 15;

BindWantedList();

break;

}

case "20":

{

grdWantList.PageSize = 20;

BindWantedList();

break;

}

 

}

}

public void BindWantedList()

{

int CategoryId = Convert.ToInt32(Session["CategoryId"]);

BllWanted.GetWantList(CategoryId);

grdWantList.DataSource = BllWanted.WantList;

grdWantList.DataBind();

}

 

combo box having values like 3,15,20...i am using tht code code but grid view 
does not change in page size how to i change page size dynamically

Plz help me
azees


    
  

  

1 Answer, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 08 Sep 2008, 05:53 AM
Hi Azees,

See the live demo implementation below demonstrating the requested functionality:

http://demos.telerik.com/aspnet/prometheus/Grid/Examples/Programming/PagerTemplate/DefaultCS.aspx

Regards,
Konstantin Petkov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Azees
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
Share this question
or