.net - How to test a DataGridView cell/column for Date OR Nullable Date? -


we have code takes datagridview , stuff rows , columns.

for operations behaviour depends on column data type.

we can test system.string etc.

if grd.columns(x).valuetype gettype(system.string) ... endif 

or if prefer:

if (grd.columns(x).valuetype == typeof(system.string)) { } 

date columns can tested same way.

but if want test, basically, column date or nullable date how can that?

this answer helped. seems gettype (or typeof) happy datetime? datetime.

so can ask

if ... gettype(datetime) or ... gettype(datetime?) 

and off go.

p.s. or indeed gettype(nullable(of datetime))


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -