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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T01:07:19+00:00 2026-05-11T01:07:19+00:00

I am using a Datagrid with several columns of data (call it myDG) and

  • 0

I am using a Datagrid with several columns of data (call it myDG) and one of these columns is a DateTime bound to a datasource. Its value is dependent on a ‘job’ object completing a job and assigning the date time value. Since this normally takes up to a minute the value is left unassigned at the beginning.

The column’s asp.net definition is:

<asp:boundcolumn    DataField='CompletedDate'    HeaderText='Date Completed'    DataFormatString='{0:dd-MMM-yyyy <br> hh:mm:ss tt}' /> 

So the functionality works fine when the ‘job’ has completed and it sets the time. But before that, while the row is being displayed, it shows as

01-Jan-0001 12:00:00 AM

I am wanting to hide this and determined that the best way would be to mask that particular row and column with a blank, or override the value temporarily. I am having problems doing this and finding a way to access that specific row and column.

It is the [3] column of the datagrid and always in the first row (since new rows are added at the top).

Is there a way to directly access this cell and temporarily ‘hide’ its contents, or mask them? Ideally it would be great if there was a way to blank out all rows that had a value equal to this in their column, but a way to manipulate the specific cell would work as well.

-thanks in advance!

  • 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. 2026-05-11T01:07:20+00:00Added an answer on May 11, 2026 at 1:07 am

    I have done similar things in the past and here is what I have done.

    Bind the data to a column that is not visible at all. Add a visible column for the data you wish to display. At the time you populate your grid, loop through the records and for any that have a value that isn’t 01-Jan-0001 12:00:00 AM, set your visible row to that value. If it does equal 01-Jan-0001 12:00:00 AM, then set the value of your visible row to an empty string or some value of your choice. (You could even set the text color to the same as the background color so it wouldn’t appear to the user)

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

Sidebar

Related Questions

How do you avoid using dataGrid.Rows[x].Cells[y].Value of a data grid when accessing their values?
I have a WPF Datagrid populated with data from one SQL table using Entity
I'm using a datagrid to display a column of date ranges and several columns
I am using Datagrid and SQLDataSource to bind data from just one table. In
I am using Advanced DataGrid of Flex 3 with hierarchical data. The itemRenderer is
I am using the flex datagrid to allow the user to edit some data.
I'm trying to create a DOJO DataGrid populated using a dojo.data.ItemFileReadStore with very simple
I'm using DataGrid with AutoGenerateColumns=True. Now in addition to auto-generated columns I want to
I'm using DataGrid bound to List property in my user control: <DataGrid x:Name=dataGrid ....
I'm using a DataGrid, which datasource is exported to Excel. I'd like to shape

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.