Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5991445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:23:14+00:00 2026-05-22T23:23:14+00:00

I’m having trouble wrapping my head around .NET DataTable events, handling, actions, etc. I

  • 0

I’m having trouble wrapping my head around .NET DataTable events, handling, actions, etc.

I have attempted to understand from the MSDN library, but I find I haven’t got an understanding of how it all works together. I also haven’t been able to find any other source (by googling) that explains the ins and outs of it.

For example, I’m trying to understand that there are DataTable events (such as ColumnChanged, RowChanged, etc.) but there are also DataRowColumnChangeEventArgs, DataColumnChangeEventArgs, etc. How do they relate/work together?

Can anyone provide a link that provides a thorough explanation of DataTable events and handling? (Or provide one yourself if you have that kind of time lol!) (Hoping for examples in C++ in particular, but if in another language I can make do for now)

Thanks so much!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T23:23:15+00:00Added an answer on May 22, 2026 at 11:23 pm

    It looks like you’re getting confused between the events themselves and the EventArgs parameters that get passed to your actual event handler.

    When you register to handle an event, there are a couple of things you have to know. I’ll use your ColumnChanged event as an example.

    The first is that the Event you’re registering for is the ColumnChanged event (seems straight forward, but I included it for clarities sake).

    The second is that to register for an event, you need an event handler. That event handler has to match the delegate signature provided by the event. In the case of ColumnChanged, the delegate must take two parameters: 1) an object called sender and 2) an object used to pass event specific arguments called DataColumnChangedEventArgs. Your method should look something like:

    public void ColumnChangedHandler(object sender, DataColumnChangedEventArgs e)
    {
        // Do some work here when the event is fired
    }
    

    After you have that, the last step is actually registering your handler to handle the event:

    someDataTable.ColumnChanged += 
        new DataColumnChangeEventHandler(ColumnChangedHandler);
    

    Now, if you look around you’ll probably notice that some people use shortcut syntax to create a handler all in one step:

    someDataTable.ColumnChanged += (object sender, DataColumnChangedEventArgs e)
        {
            // Do some work here when the event is fired
        }
    

    That will allow you to create an anonymous method to handle the event, but could cause problems when it comes time to clean up the object and un-register any handlers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.