Datagridview question in vs2005 VB.net

B

Bob

I have a form with one control a datagrid view that is bound to a table an
OK button and a close button - No navigation controls. Its just used a a
selector for a record and then opens another form, storing the primary key
of the chosen record in a global variable for later use when the user clicks
on OK.

Problem is, I display two columns in the grid and when the form opens, the
first cell in the first row always has a blue background, which leads the
user to believe that that is already the selected record, but it is not yet
selected untill the user actually clicks on the record selector. then the
two cells on the selected row show blue background.

Is it possible to have the first record in the datagridview be automatically
selected after its filled? or alternately to have the first cell not show a
blue background after its filled.

I now have code that detects whether record is selected or not in the OK
button and gives user a messagebox but its still an anoyance. I tried
setting the tab order so that the Exit button is the first control to have
focus but the first cell still says shown with blue background.

Any tricks or help would be appreciated.

Bob
 
B

Bob

Well thanks to both of you for agreeing with me.
I had been hoping to get some insight on what to do though and how to
proceed in general to make the process more efficient.
I don't see the point of Microsoft distributing stuff that is useless in
real worls applications.
I suspect they use the stuff themselves so it seems someone somewhere knows
how to make it work and has some tricks, after all bashing them is fun but
they're not totally stupid, Bill wouldn't be that rich if they were.

Hope someone has some useful tips and thanks for your insights
Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top