We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to account for empty dates

Thread ID:

Created:

Updated:

Platform:

Replies:

69567 Nov 2,2007 12:23 AM UTC Nov 2,2007 04:49 PM UTC ASP.NET Web Forms (Classic) 2
loading
Tags: GridGroupingControl
Ivan Siew
Asked On November 2, 2007 12:23 AM UTC

I am returning an empty string from SQL to a monthcalendar field so that it would be "blank" in the grid, i.e. the user did not enter a date.

However, when I want to edit that row now, it hangs due to the monthcalendar not recognizing a date (empty string).

Is there a way to somehow set the monthcalendar to today's date if the datamapping coming from SQL is a blank empty string?

I tried to setValue using today's date in the beginedit action. It seemed to work until I click the cancel button, the value remained.

If the value started out as blank, I still want to make it blank when cancelling the event.

Any thoughts?

Ivan Siew
Replied On November 2, 2007 12:54 PM UTC

Hi, I am rephrasing this question.
Basically, in the gridgrouping control, how would you enable the monthcalendar control to automatically show today's date during edit mode, just like when you are adding a new row. But instead this is in edit mode of a blank column.

THanks.

Ivan

Ivan Siew
Replied On November 2, 2007 04:49 PM UTC

Ok, I found out how to go about this.

If you are using monthcalendar in the grid, set the CellValueType="System.DateTime". This currently resolves my issue.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;