Sorting in a Datagrid

A

AM

Hi!

I have a datagrid, which is bound to a dataset dsCustomer
(populated through a webservice).
I have selected Sort Expression for few Databound columns
in my Datagrid, and created event handler for the
SortCommand :

DsCustomer.Merge(ws.Cust_Get())
DsCustCont.tblCust.DefaultView.Sort = e.SortExpression
& " ASC"
dgCust.DataBind()

Event gets raised, but there no sorting gets done.
Pleeeeeeeeeeease help
AM
 
N

Nathan Bidwell

Have you tried setting the datasource to the default view?

DsCustomer.Merge(ws.Cust_Get())
DsCustCont.tblCust.DefaultView.Sort = e.SortExpression
& " ASC"
dgCust.DataSource=DsCust.Cont.tblCust.DefaultView;
dgCust.DataBind()

Nathan
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top