Solved

How to remove Error Icon from DataGridViewCell in winform and C# .NET3.5

Posted on 2013-11-20
4
728 Views
Last Modified: 2013-11-24
Hi experts
How to programmatically remove an Error Icon inside a DataGridViewCell in winform and C# .NET 3.5?

Some Internet article says "DataRow.Clear". But my datagridvew is not bound to any DataTable.

Mine is bound to a BindingSource, and the DataSource of this BindingSource is bound to a BindingList.

Thanks.
0
Comment
Question by:dominicwong
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 40
ID: 39665005
Set the ErrorText property of the cell to an empty string.
0
 

Author Comment

by:dominicwong
ID: 39665011
Thanks JamesBurger for your prompt response.
I did try to set it to string.empty. The error text is gone but the error icon stays. I need to click somewhere else before the error icon disappears.
0
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 500 total points
ID: 39665044
The cursor is probably still in the cell. The icon updates only when you move out of the cell, so move it to the next cell, which should not be a problem because you usually remove the icon once the data in the cell is validated.
0
 

Author Closing Comment

by:dominicwong
ID: 39673327
Thanks James
0

Featured Post

Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question