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

  • Home
  • SEARCH
  • 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 9246249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:27:01+00:00 2026-06-18T09:27:01+00:00

Possible Duplicate: Show message in empty cells in GridView By That code i am

  • 0

Possible Duplicate:
Show message in empty cells in GridView

By That code i am getting all the cells colored
I just need the empty one.. Can someone notice where’s my fault (Sorry I’m new to C#)

    private void simpleButton1_Click(object sender, System.EventArgs e)
    {

        string[] msg = new string[60];
        string[] error = new string[400];
        for (int i = 0; i < gridView3.RowCount ; i++)
        {
            System.Data.DataRow Rows = gridView3.GetDataRow(i);
            string cellvalue = Rows[0].ToString();
            if (cellvalue == "")
            {
                msg[0] = "Missing 'First Name'";
                error[i] = msg[0] + " - ";  
                gridView3.CustomDrawCell += new RowCellCustomDrawEventHandler(gridView3_CustomDrawCell);

            }
        }
    }
    private void gridView3_CustomDrawCell_1(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e)
    {
        e.Style.BackColor = Color.LightSteelBlue;
    }

By the way this grid was imported from Excel

  • 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-18T09:27:02+00:00Added an answer on June 18, 2026 at 9:27 am

    You need to register grid event only once, not in the loop.
    For cell coloring use RowCellStyle event.

    Customizing Appearances of Individual Rows and Cells help topic.

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

Sidebar

Related Questions

Possible Duplicate: Why does my url show domain.com/?state=5a02… instead of just domain.com? I've asked
Possible Duplicate: Uploadify: show error message from HTTP response I am trying to get
Possible Duplicate: Why does my simple C++ GUI application show a message box in
Possible Duplicate: Show just the current branch in Git I am moving my monotone
Possible Duplicate: Show modal JS dialog on any site using button I need some
Possible Duplicate: Uploadify: show error message from HTTP response I am developing the application
Possible Duplicate: git: show all changed files between two commits How can I get
Possible Duplicate: Hide/Show Navigation & Tool Bar on tap This is the void I'm
Possible Duplicate: Programatically show tooltip in winforms application When set a TooltipText on a
Possible Duplicate: Tasks should show up only if the user has been assigned it

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.