Main Topics
Browse All TopicsI have a program that adds a timestamp to the 3rd column in my program. This column was added after the query column... When a user enters in data the 3rd column will add the time that it was added. What I need to do is to sort on that third Column. The first column is populated by a SQL Procedure.. It seems as if that is the only column I can get the datagrid to sort on, but that is not what I need to do..
Any help would be appreciated.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I am going to try what you said above. I dont need to actually know how many matches there are.. Just that they are in order.. So if they don't match then they can hang out at the bottom or top of the datagrid.. dosent matter.. :) I have a binding Navigator that keeps a count.. that is good enough for them.
It seems that there is an issue when trying to sort a column that is attached to a datasource.. Some your third link seems to point out that his example would not work if it was attached.
So far I have been able to sort the Unit Numbers.. but if I click on the column title.. it erases all results in column 2 and 3.. NOT GOOD..
When I click on column header.. nothing happens...
I will keep review examples..
Also.. I have a form 1 which has all three of my columns.. before I added columns 2 and 3 I created a inherited form (form 2). Later on I added columns 2 and 3 to form 1. I notice that unless I run my project I do not see column 2 and 3 on form 2. Should I be doing some kind of re-compileing of inheritance to form 2 from form 1???
No I don't save the changes.. I have a print button.. They print out the results.. A hard copy is all they need. The only other use for the binding source is a on a fill tool strip.. this is where the parameters are located so the user can enter in the data and then hit the fill button (connected on the tool strip) to populate the unit numbers column..
It may be too late at this stage but if i was doing this form, i would not have used the bindingsource. I would not have used the designer for database. I would design the interface, then i would write some code like this
Dim dbadp as New SQLDataAdapter("select ...", connectionstring)
Dim dTable As New DataTable
dbadp.Fill(dTable)
dbadp.dispose
dTable.Columns.Add("Match"
dTable.Columns.Add("TimeSt
grid.datasource = dTable
Your right.. it is most likely to late for me to re-vamp the project.. I would need to do it over the weekend or copy the program and make changes to the program over the weekend..
What I really should do is have a test program and then a live program.. I never did that in the beginning..
I need to make changes..but they also need to use the program..
I did not receive your email... My email is jbarman@mvrbc.com
I made a copy of my project.. but I think for this project being that the only thing left to do is find a way to get the 3rd column to sort.. I think I should finish this and start on the next.
My next project is almost exactly the same as this one.. I am not sure how to "design" the interface..
I am not sure where to place the code you provided eaither..
I also found that when I add a 3rd column.. Print doesn't work.. I was thinking of concatinating Match and timestring just so the the print will work.. This project is getting kinda messy.. YUCK...
Business Accounts
Answer for Membership
by: CodeCruiserPosted on 2009-09-29 at 06:15:19ID: 25448596
One option is to set the column's datatype to be DateTime rather than string. Then set the format of the column to only show time. Then you wont need to worry about the sorting.
lStyle.For mat = "HH:mm"
grid.Columns(2).DefaultCel
By the way, you wanted to record the NUMBER of matches!