473,387 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to determine active sort order parameter of a DataGrid

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
Nov 18 '05 #1
1 1444
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
"Hrvoje Vrbanc" <hr*****@recro.hr> wrote in message
news:OH***************@TK2MSFTNGP15.phx.gbl...
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

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Christopher W. Douglas | last post by:
I am writing a VB.NET application in Visual Studio 2003. I have written a method that handles several events, such as closing a form and changing the visible status of a form. I have some code...
5
by: Kurt Schroeder | last post by:
I'm using VS.net. I have created a component with the basic set of database commands. This component returns a record set that is bound to a datagrid. I want to add a dynamic sort, but am not sure...
19
by: Christopher W. Douglas | last post by:
I am writing a VB.NET application in Visual Studio 2003. I have written a method that handles several events, such as closing a form and changing the visible status of a form. I have some code...
3
by: paul | last post by:
Hi, I've a DataGrid and a DataSet (not a DataView) as the DataSource. Users can click on column headers and sort the contents of the DataGrid. I want to know how to determine which column is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.