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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T09:03:58+00:00 2026-06-07T09:03:58+00:00

I am populating a datagrid with a dataset and I have my dataset verified

  • 0

I am populating a datagrid with a dataset and I have my dataset verified for nullable values –

My problem is :

When the dataset is validating, it found empty rows and the errors are not displayed.
I would like to define the empty cells with a DBNull.value. Is there any way to do it ?.
I have found a property named TargetNullValue that could work ?

  • 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-07T09:03:59+00:00Added an answer on June 7, 2026 at 9:03 am

    I found a way to do it, by making a convertion

     public class ConvertStringToDBNull : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo cufo)
        {
    
            if (value is string)
            {
                if (value.ToString() == string.Empty)
                {
                    return DBNull.Value;
                }
            }
            return value;
        }
    
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo cufo)
        {
    
            if (value is string)
            {
                if (value.ToString() == string.Empty)
                {
                    return DBNull.Value;
                }
            }
            return value;
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a datagrid/gridview. I'm populating the grid with 10 rows initially. On a
We have accounting software populating the name field on a magento webstore, the problem
I currently have a WPF DataGrid binded to a DataSet via the DataGrid's ItemsSource
In my WPF app, I have a datagrid with a IntegerUpDown control displayed in
I'm populating a table with values from my database. I have included a delete
I have a silverlight form where in i am populating a datagrid in the
In an earlier question, Why is my ExtJS datagrid populating as empty? , I
I have a WPF Datagrid and I am populating the row numbers for it
I have a problem with datagridview. Form 1 : populating data with datagridview ...(when
im populating the data in the combo box using dataset tables...with some table name..now

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.