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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:37:38+00:00 2026-06-17T23:37:38+00:00

I need to check if a cell is empty and store a message to

  • 0

enter image description here

I need to check if a cell is empty and store a message to then create a new cell in every row that contains all the messages

But I don’t know know how to work with DevExpress can someone help with my code

    string Name = "First Name";
    string FName = "Father Name";
    string LName = "Last Name";
    string EmpCode = "Employee Code";
    string Tax = "Tax#";
    string SocSec = "Soc.Sec#";
    string EmpType = "Employment Type";
    string DepCode = "Department Code";
    string DepDesc = "Department Description";
    private void simpleButton1_Click(object sender, System.EventArgs e)
    {
        try
        {
            OleDbConnection con = new OleDbConnection();
            con.ConnectionString = "Provider=Microsoft.Ace.OLEDB.12.0;Data Source=C:\\Users\\pc\\Documents\\Emp.xlsx;Extended Properties=\"Excel 12.0;HDR=Yes\"";

            con.Open();
            DataTable dtSchema;
            dtSchema = con.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, new object[] { null, null, null, "TABLE" });
            OleDbCommand Command = new OleDbCommand ("select * FROM [" + dtSchema.Rows[0]["TABLE_NAME"].ToString() + "]", con);
            OleDbDataAdapter da = new OleDbDataAdapter(Command);
            DataSet ds = new DataSet ();
            da.Fill(ds);
            dataGrid1.DataSource = ds.Tables[0];
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message);
        }

This loop isn’t giving me the right message about empty cells I think it’s not right what i wrote maybe there’s another better way…

        for (int rows = 0 ; rows < gridView3.RowCount ; rows ++)
        {
            string[] msg = new string[50];

            if ((gridView3.GetRowCellValue(rows, gridView3.Columns["LName"])) == null)
            {
                msg[rows] = "name missing";
            }
        }
  • 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-17T23:37:39+00:00Added an answer on June 17, 2026 at 11:37 pm

    From what I know the cell’s value won’t be null. The underlying datasource however will have a null value.

    To check if a cell’s data is null or summed from nulls:

    private bool IsNullValue(PivotDrillDownDataSource ds, PivotGridField field)
    {
        if (ds.RowCount == 0 || field == null) return false;
        for (int i = 0; i < ds.RowCount; i++)
        {
            if (Equals(ds[i][field], null))
            return true;
        }
        return false;
     } 
    

    To change text in null cell:

    if (IsNullValue(e.CreateDrillDownDataSource(), e.DataField))
         e.DisplayText = "NULL OR SUM WITH NULL";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Excel file that contains some values. I need to check if
I need to check if the first cell in the first col contains the
I need to check for duplicates before saving to the database in the create
I need to check some settings for all users on Windows clients in the
I need to check to see if a directory is empty. The problem is,
I need to check if my address has any words that matches word in
I have html table that get data from mysql. Every 5 seconds I check
I have a table and in every row I have a cell (Example, for
In a sql based query, I need to check that the persons I select
I need to check if cell A5 (Song Name), B5 (Album), C5 (Artist) is

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.