c# - Blank row in DataGrid if date is equal to 0001-01-01 -


i have form user fills in , default field called followupdate set 0001-01-01. error saying date in wrong format if leave field blank had set default.

when form saved creates new line in datagrid , followup date shows 0001-01-01. if date set row blank.

foreach (datagridcolumn col in dg.columns) {     if (col.headertext == "follow date")     {            // set row blank                          } } 

how check if row contains 1/1/0001 , if don't display date?

enter image description here

try if date minimize

if(yourcolunm == datetime.minvalue) { yourcolum = null; } 

Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -