473,508 Members | 2,346 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datagridview question in vs2005 VB.net

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
Jan 4 '06 #1
1 1791
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
"Bob" <bd*****@sgiims.com> wrote in message
news:ee**************@TK2MSFTNGP10.phx.gbl...
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

Jan 4 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
6390
by: dbuchanan | last post by:
Hello, Is this a bug? Is there some kind of work around? I want to add default values for a few columns in my datagridview I found the "DefaultValuesNeeded" event for the datagridview I...
1
3189
by: Brian | last post by:
I've got a couple questions on the new Datagridview control in VS2005. 1) In the old datagrid control at design time I was able to add multiple tablestyles with columns from different...
10
7773
by: michael sorens | last post by:
Is it possible to store an unbound DataGridView component into a setting? I naively tried defining a Setting that is a DataGridView called DGV, then simply assigning it:...
7
12551
by: Mitchell S. Honnert | last post by:
Is there an equivalent of the DataGrid's DataGridTableStyle for the DataGridView? If not, is there an easy way to duplicate the DataGridTableStyle's functionality for the DataGridView? Here's...
0
308
by: vbt | last post by:
(VS2005) I am new to using the DataGridView and I have read most everything I can find on this subject. But obviously I am not see the hole picture. I am trying to update a data base...
0
974
by: tom | last post by:
I am working in VS2005 with the DataGridView. When I click on a cell and move on by clicking on another cell all the data is removed from the first cell. Is there a way to prevent this from...
3
6308
by: =?Utf-8?B?Sm9obiBCdW5keQ==?= | last post by:
New to databinding in vs2005, I always did it manually in 2003. I have no problem loading comboboxes, and a change in that combobox changes the data in the textboxes but I can not figure out a way...
6
4399
by: hzgt9b | last post by:
Using VS2005, VB.NET, I have a windows app with a DataGridView (lets call it DGV). At some point in the life of my app I want to clear the selection of the currently selected row...
1
2839
by: mtembene | last post by:
I have a windows form "BaseForm" that contains a DataGridView that is not bound to any datasources and a button. Both of these controls have a modifier of "Protected Internal" and none of the...
2
8431
by: hnpatel | last post by:
Hi to All, How to use mouse click event for datagridview in c# in vs2005? I m using datagridview in c# application.I had bound data in datagridview.I want to display data in textbox when i...
0
7324
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7382
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7042
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7495
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5627
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5052
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1556
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.