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
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