-
Jul 22nd, 2008, 05:00 PM
#1
Thread Starter
Hyperactive Member
Sorting by Unbound column
Hi everyone. Again.
I'm using Microsoft Access 2003, an OleDb connection and Visual C# 2005.
I'm using a mostly databound datagridview, with a single unbound column called "status". In my code, I compare a number of columns in the grid view, return a string, and fill in the unbound status column with that string.
The only real reason I'm doing this is so that the user can sort the datagridview by this string. In all the other columns, I can click the column header to sort them. Unfortionately, for some reason doing the same on the unbound column has no effect.
Any help would be appreciated. Thanks.
"Why do all my attempts at science end with me getting punched by batman?" xkcd.
| Pong| |
Sorry for not posting more often.
-
Jul 22nd, 2008, 06:38 PM
#2
Re: Sorting by Unbound column
This is not a database question. It's a pure VB question and should have been asked in the VB.NET forum.
You simply have to sort your grid programmatically. I suggest that you read the MSDN documentation for the DataGridViewColumn.SortMode property and follow the appropriate links from there.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|