How to determine active sort order parameter of a DataGrid

  • Thread starter Thread starter Hrvoje Vrbanc
  • Start date Start date
H

Hrvoje Vrbanc

Hello all!

I would be grateful if someone could offer me some help with the following
problem:

I have a DataGrid control with sort enabled. Therefore it could be sorted in
several different ways. The same datagrid also have a Button Column with
Update button. After the update action for any particular item is completed,
my update method calls FillDataGrid(sort_parameter) function to refresh the
DataGrid content. But...how could my update method know what is the current
sort order (i.e. sort parameter) in order to pass it to FillDataGrid
function in order for my DataGrid to remain sorted the way before the update
action?

Thank you in advance.

Hrvoje Vrbanc
 
I should have been thinking more before posting!
I don't know if this is the best way but I simply put sort parameter
(hardcoded in forst page load and e.SortExpression after further sorting) in
a session variable that I then pass to my FillDataGrid function from update
method.

Hrvoje
 
Back
Top