473,325 Members | 2,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

how do i tell datagridview to do something automatically???

hello~
i was wondering how can i tell datagridview to do something automatically?
for example...usually its easy to tell datagridview to do whatever if you click anywhere in the datagridview...but i want datagrid view to do something as soon as the program is running

i was thinking that i have to change the private sub 'handles' to something but idk which event to choose...currently my program works if the datagridview handles 'cellcountclick' which i don't want

i've attached the code...BTW I'M USING VISUAL BASICS 10
Attached Files
File Type: docx Private Sub DataGridView.docx (10.8 KB, 420 views)
Feb 26 '12 #1

✓ answered by ADezii

You need to Shift your Code to an Event handler that is fired when the DataGridView is initially Loaded, such as the RowEnter() Event.

3 1759
ADezii
8,834 Expert 8TB
You need to Shift your Code to an Event handler that is fired when the DataGridView is initially Loaded, such as the RowEnter() Event.
Feb 26 '12 #2
THANK YOU FOR THE REPLY!!!
so are you saying i need to put that code in my 'clickdatagridview' private sub to a rowenter() event?
sorry but i'm not sure what you mean by a rowenter() event...how do i make that?

PS. No wait. Sorry i know what you mean =) ...event as in after 'handles'....its just i can't get the right one
Feb 26 '12 #3
ADezii
8,834 Expert 8TB
Expand|Select|Wrap|Line Numbers
  1. 'Declaration
  2. Public Event RowEnter As DataGridViewCellEventHandler
Expand|Select|Wrap|Line Numbers
  1. Private Sub dataGridView1_RowEnter(ByVal sender As Object, _
  2.     ByVal e As DataGridViewCellEventArgs) _
  3.     Handles dataGridView1.RowEnter
  4. End Sub
Feb 27 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Peter Abel | last post by:
Hi all, I'm working under W2k with Python 2.2.2 (#37, Oct 14 2002, 17:02:34) on win32 I have a file *test_data.txt* with the following content: 0123456789 0123456789 abcdefghi...
37
by: ajay | last post by:
How to make a web page getting refreshed after a given time interval automatically. HTML Code plz. Tx Ajay
13
by: gary | last post by:
Hi, We all know the below codes are dangerous: { int *p = new int; delete p; delete p; } And we also know the compilers do not delete p if p==NULL. So why compilers do not "p = NULL"...
1
by: Bob | last post by:
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...
7
by: UJ | last post by:
Is there a way to tell when something was compiled? (I'm trying to find a way to keep track of what 'version' the web site is and can't find anything that only changes when it's recompiled.) TIA...
1
by: =?Utf-8?B?VkJB?= | last post by:
Hi Well what i'm trying to do is search text in a datagridview, i've seen similar code around in other posts or forums, i'm implementing this by using a Textbox, and the code in the TextChanged...
8
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
If I populate a DataGridView with a query supplied at runtime, boolean fields render as a CheckBox instead of just a text rendering of '0' or '1'. That is nice sometimes, but I would like the...
0
by: enrico via DotNetMonster.com | last post by:
when i click the delete record i want my datagridview to automatically clear the deleted record or refresh my DGV because even though it is already deleted in the database the datagridview doesn't...
2
by: Rob | last post by:
I have a few columns wich represent a primary key from a table. I would like to disallow changing any of its content within the datagridview. Something that would appear logical to me does not...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.