[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


ASP .NET - SQL Dropping a customer to the bottom of a datagrid when clicked on.

Posted on 2007-10-02
Medium Priority
Last Modified: 2008-01-09
I am listing contractors on a web site using SQL scripting sorting by clicks.

When someone clicks on a contractor from the list their position drops down to the bottom, then as other contractors are clicked they get pushed down to the bottom and the other one gets to go one up.

Here a thought:
Since the list will never be more than 500 I use this SQL script:
UPDATE Customers SET clicks = clicks + 500 WHERE (CusID =  [indoogrid:idValue])

 and of course sort by clicks when displaying list.

but how do the others go up in proper order  ...

say I have 50 set to 500 sorted by Clicks....  How will the first contractor clicked remain 50 from the bottom ?

is there a solution to this ?
Question by:siacom
1 Comment

Accepted Solution

jklNYC earned 2000 total points
ID: 20006358
what about instead of sorting by a arbitrary "click" value, add a datetime field called "ClickDate".  when you click on a contractor, set  that items "ClickDate" value to getDate(). then just sort the list by "ClickDate".

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
Creating a Cordova application which allow user to save to/load from his Dropbox account the application database.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question