grid view sorting and paging

P

puja

hi all,

am using grid view in asp.net 2.0 . My problem is easy but can't get it to
work.

My grid view id = grdContract and am binding grid view using dataset My
dataset returns 5 columns from sql database and I have auto generate columns
= true for grdContract

grdContract.DataSource = ........dataset returned by a function

grdContract.DataBind();

Now I want to to enable sorting on each column header and and also allow
paging. Could you please cause I can't get it to work.

Do i need to have template columns instead ?

pls help
 
F

Fred Exley

puja said:
hi all,

am using grid view in asp.net 2.0 . My problem is easy but can't get it to
work.

My grid view id = grdContract and am binding grid view using dataset My
dataset returns 5 columns from sql database and I have auto generate
columns = true for grdContract

grdContract.DataSource = ........dataset returned by a function

grdContract.DataBind();

Now I want to to enable sorting on each column header and and also allow
paging. Could you please cause I can't get it to work.

Do i need to have template columns instead ?

pls help

I used this tutorial to get sorting/paging working in my app:
http://pluralsite.com/fritz/webcasts.aspx

Look at lesson 3 (DataBinding), around 20 minutes into it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top