473,607 Members | 2,659 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Implementing DataGrid Events

Dan

When I put a datagrid on a form in VB.NET, and then go to the code page, I
can select the datagrid in the left-hand dropdown, and see all the available
events for the datagrid in the right hand dropdown. I can then select the
event I want to implement and start coding.

However, if I do the same thing in C#, there doesn't seem to be a
correspondingly simple way to select a datagrid event and implement it. Am
I missing something?

Thanks...

Dan
Nov 15 '05 #1
2 4333

1) Select your form.
2) Go to the form's properties window - usually bottom
righthand corner.
3) Select the 'lightning bolt' icon {aka events tab}
4) Scroll through the list of events and locate the
desired event.
5) double click on the event; Visual Studio will generate
an empty event handler method on your form class with
correct arguments.

--Richard

-----Original Message-----

When I put a datagrid on a form in VB.NET, and then go to the code page, Ican select the datagrid in the left-hand dropdown, and see all the availableevents for the datagrid in the right hand dropdown. I can then select theevent I want to implement and start coding.

However, if I do the same thing in C#, there doesn't seem to be acorrespondingl y simple way to select a datagrid event and implement it. AmI missing something?

Thanks...

Dan
.

Nov 15 '05 #2

Step 1 should read:

1) Select the DataGrid control in the forms editor
-----Original Message-----

1) Select your form.
2) Go to the form's properties window - usually bottom
righthand corner.
3) Select the 'lightning bolt' icon {aka events tab}
4) Scroll through the list of events and locate the
desired event.
5) double click on the event; Visual Studio will generate
an empty event handler method on your form class with
correct arguments.

--Richard

-----Original Message-----

When I put a datagrid on a form in VB.NET, and then go
tothe code page, I
can select the datagrid in the left-hand dropdown, andsee all the available
events for the datagrid in the right hand dropdown. I

can then select the
event I want to implement and start coding.

However, if I do the same thing in C#, there doesn't

seemto be a
corresponding ly simple way to select a datagrid event
andimplement it. Am
I missing something?

Thanks...

Dan
.

.

Nov 15 '05 #3

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

Similar topics

2
3590
by: cppaddict | last post by:
I have a design question which I am posting here because the implementation will be in C++ and I think there may be C++ specific language constructs (eg, friends) that might be relevant to the solution. I am implementing the Mediator pattern to create an event-driven app. The Collaborators (which watch for various events and which all have a reference to the Mediator object) will call handleEvent(Event e) on the Mediator object when...
7
2250
by: TT (Tom Tempelaere) | last post by:
Hi there, I'm struggling to get the right event. I want to be notified of a change in a cell in a DataGrid made by a user. I need following information about the change: * the row index * the column index * the newly entered value I need this information to update another DataGrid. I have checked the
5
12227
by: John Richardson | last post by:
I've been bothered for some time about my DataGrid not populating my rows very quickly. I have about 10K rows loading into the grid. I create a datatable dt with 2 columns, an ID and a display. The ID is a member of the keys array. I then create a DataView dv over the table, and sort it by Display and ID column (in case of duplicate Display). I then set my DataGrid.DataSource = dv; I then load the datatable with my rows, and this is...
8
1706
by: Brent Burkart | last post by:
My datagrid OnCancelCommand event is not firing. HTML OnCancelCommand="AdminGrid_Cancel" 'Code Behind Sub AdminGrid_Cancel(ByVal sender As Object, ByVal e As DataGridCommandEventArgs) AdminGrid.EditItemIndex = -1 BindData()
2
2380
by: andla | last post by:
Hi, How does events fire in a datagrid. I know about the problem if turning the viewstate off the events wil not fire properly even if I rebind the control in every postback. S then I started to think how does .Net do it if I turn the viewstat on. If you use the Request.Form then you can get all the controls tha
2
2373
by: Carl Tribble | last post by:
Is there any way to reliably catch KeyUp events for Function keys in particular while inside a datagrid? I have a form with KeyPreview=True and I am using the Form.KeyUp event to handle several function keys (F5, F6, etc.) The problem is I have a datagrid on this form and it seems whenever the datagrid has the focus, it consumes most of the key events without passing them on to me. I have tried using a DataGridTextBox control, which...
5
6691
by: Jeff User | last post by:
Hello ..NET 1.1, VS 2003, C# & asp.net I have tried to follow msdn instructions and samples but I can not get an event to fire for this button on the datagrid. There has to be something obvious missing here, but after 2 days I am ready to explode ! Please help. To create the Delete button I selected the grid in design view, clicked the "Columns" property and added the Delete button in the
4
2123
by: Jeff User | last post by:
Hi I tryed to solve this problem over in the framework.asp group, but still am having trouble. Hope someone here can help. using .net 1.1, VS 2003 and C# I have an asp.DataGrid control with a Delete button on the end of each row. I am unable to gain access to the event when the button is clicked. I don't fully understand how the click gets connected to the C# code,
0
1662
by: WhiteWizard | last post by:
I am trying to implement standard multi-select of rows in a datagrid. That is, allow the user to use the CTRL & SHIFT keys to select multiple rows in a datagrid. Then I'll loop through them and process the selected rows. The problem is that the KEY events don't seem to be firing on the datagrid. When I just click on a column of the datagrid, and then press a key, the events fire. However, when I use the above keys and select some rows,...
0
7987
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8472
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8464
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8130
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6805
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6000
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3954
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1574
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1318
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.