Sorting on *stacked* data using webforms datagrid

J

Jimmy

I have a need to display multiple column data in a single column. I'm doing
this by combining the output in the underlying SQL view e.g., [CompanyName] +
'<br>' + [Address] as 'Company Name<br>Address'.
---------------
Company Name
Address
===========
Acme handyworks
123 Main Street
--------------------
Doodle Arts
324 Lincolnway Dr
--------------------

The data comes up stacked just fine but the problem is that each header
needs to be sorted separately. I need a way so that when someone clicks on
the Company Name link, it sorts by Company Name and when Address is clicked,
the list is sorted by Address.

I can't figure out how to program the SortExpression to recognize the
partial name on the header row.
- I'm using custom Page Navigation using a stored procedure that takes page
number as input and returns the approriate sub set of data.
- I'm currently sorting by building the OrderBy clause and passing the
string to the sp.

JZ
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top