Static DataGrid - Dynamic Column Order - Sorting Issue

D

Dan

I have a datagrid with 11 columns defined in the aspx page. When I load the
page, I bind the grid normally and then pull the users customized settings
from the database. I pull off all of the original columns from the datagrid
and store in a collection. Next, I clear the columns from the datagrid and
then re-add them back to the datagrid according to the order the user
specified. I then rebind the data. The page renders correctly and looks
great.

I have a problem when I click on a column heading to sort. First, I am
getting the original SortExpression from the static layout of the column
defined in the aspx page not the sort expression for the column I clicked
on. (for example, if I have swapped col 2 and col 6, when i click on col
6's header to sort, I am getting the column 2 SortExpression.)

I am thinking there is a problem with the javascript that gets generated
during the first bind- any ideas how I can either clean it out and force new
javascript with the 2nd bind?

Any alternate suggestions for handling customized column order?
Additionally, the users have the ability to hide the column. I was trying to
avoid creating a datagrid that is totally dynamic because of time
constraints.

Thanks,
Dan
 
D

Dip Gada

I am having the same issue and was wondering if anyone had any
suggestion or solution.

Thanks,
Dip
 

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,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top