Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello guys i have a datagrid view with a column of full name for example this is my data gridview and my tablename is TBLNAMES

Full name:
Lebron James Jr.
Kobe Bryant
Kevin Durant Sr.

I want to sort this by their lastname (James,Bryant and durant)

please help me guys.

What I have tried:

i tried substring but can get the correct syntax.
Posted
Updated 27-Dec-16 20:01pm
Comments
Maciej Los 28-Dec-16 2:38am    
If you have First and Last Name data, you're able to achieve that in few seconds. If not, you have a trouble (solvable).
Member 12919944 28-Dec-16 2:46am    
i dont have . i concat the firstname,lastname and extensions name to that column
ZurdoDev 28-Dec-16 8:23am    
So put them into separate columns.
Member 12919944 28-Dec-16 9:22am    
if i do ? how can i now ?
ZurdoDev 28-Dec-16 9:25am    
What do you mean? How can you have a column for firstname and a column for lastname? That is very straightforward so I am not sure what you are asking.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900