Sorting and Paging Datagrid?

P

P Dietz

Hello NG,
I'm using a datagrid for displaying data (wow!) and would like to use the Sorting and Paging of it. The grid is bound to a dataset, which is added in the webform-designer.

I load the data by:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

If Page.IsPostBack Then Exit Sub 'is this correct?? or should i make something else?


DsMDK1.Clear() 'dsmdk1 ist the dataset
Dim dr As DataRow
Me.da1.Fill(Me.DsMDK1)' da1 the ora- dataadapter
before binding the grid to the dataset (the datasource/member as set in desinger : me.datagrd.databind), i have to change some data in the dataset "manually", it can't be queried by the dataadapter.

Displaying the data works fine, the grid shows also the headers as links and the paging links, when i check the paging/sort boxes, but clicking the link will cause no effect. I thought to use this "if page.ispostback then exit sub" to avoid new load of data, but it's the same (nothing) with or without it....

I hope you can help me despite my terrible english ;-)

Thanks

Peter
 

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

Members online

No members online now.

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,805
Latest member
ClydeHeld1

Latest Threads

Top