CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 How to sort in a grid on a column from another tab

Print topic Send  topic

Author Message
nagu
Posted: 05/08/2002, 2:00 PM

Hi,

How do I pre-sort the grid based on the string I get thru join from another table.

For example, lets say I list employees. the current table has employee id and use join to get employee names from another table. I define the field in CC as label or URL and use the join tab to list the table and columns.

In the properties for the form, I can choose to order by columns of the current table(only employee id is available). so how do I sort the list based on employee name.

thanks,

Nagu
Nicole
Posted: 05/09/2002, 6:42 AM

Nagu,
you can access sOrder variable in form Open event that stores "order by" clause and assign it proper order value.
nagu
Posted: 05/09/2002, 12:41 PM

Nicole,

Thanks for your suggestion. setting the sOrder in open event served the purpose. But it was changing the behavior for clicking to sort on any other column by the user. So to achieve what I wanted I tried the following condition in open event (ASP code). This code applies the order the first time the screen is viewed. If the user clicks on a column, the iSort variable has the field number in it.

if (iSort == "") then
sOrder = "order by blah blah "&sDirection
end if


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.