Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 12890

How to specifically sort the data in a database using c#?

$
0
0

H!,

I have a problem in c# that require sorting of names of students in a sql database and i want it to be specific, i used data grid view to view the data of the students as shown below:

Students First Name:

Ann
Antoinette
Brenda
Judith
Lester
Santos
Suzie
Tim

if i type in a letter or abbreviation @ a textbox1 for example "s", all Names that starts with letter s will be sorted first so the output now of the query will become:

Students First Name:

Santos
Suzie

Ann
Antoinette
Brenda
Judith
Lester
Tim

So if i type j, all that starts with j will be first, and so on.

I need help for this problem coz it is so hard for me to output the students with this kind of sorting and is there a code or query string related to this problem?

thanks in advance.

Hardz


Viewing all articles
Browse latest Browse all 12890

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>