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 8853475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:39:46+00:00 2026-06-14T13:39:46+00:00

I have a WPF DataGrid . The users can edit the data in cell

  • 0

I have a WPF DataGrid. The users can edit the data in cell. I want a event in that I want to check if cell is empty. User can empty the data by using Del Backspace Cut options etc.

Give me a event and event handler to do that. I already tries OnCellEditEnding event but this will trigger only if edit is finished. I want to check cell is empty dynamically each time when user inputs.

  • 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-06-14T13:39:48+00:00Added an answer on June 14, 2026 at 1:39 pm

    each datagridcell has a textbox as its content when it is in the edit mode. you can check the text Length written in that textbox whenever a key is down (by handling onKeyDown or onPreviewKeyDown event)

    edit:

    use PreparingCellForEdit event, sth like this:

    void MainDataGrid_PreparingCellForEdit(object sender, DataGridPreparingCellForEditEventArgs e)
    {
       TextBox tb = e.Column.GetCellContent(e.Row) as TextBox;
       tb.TextChanged+=new TextChangedEventHandler(tb_TextChanged); 
    }
    
    void tb_TextChanged(object sender, TextChangedEventArgs e)
    {
       //here, something changed the cell's text. you can do what is neccesary
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WPF DataGrid that increases in height when I add data to
I've got a WPF DataGrid that I have been using for some time, and
I have a user control that contains a WPF toolkit DataGrid . This control
I have a WPF DataGrid with some data. You can add rows through a
I have a wpf datagrid that I want to sort programatically as if the
I have a WPF app that binds a DataGrid to an XML document using
I have a WPF DataGrid who's data source is an ObservableCollection. It is set
I am using a WPF DataGrid and I have the IsSelected property of the
I got some problems in Datagrid WPF I have a datagrid, and I want
I have a wpf application using caliburn.micro. It has a datagrid and a combobox.

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.