Datagrid Empty Set

  • Thread starter Thread starter Jeff Haumesser
  • Start date Start date
J

Jeff Haumesser

Here is one I am stuggling with:

I have a project I'm developing in VB .NET. I have a datagrid in a window
with two columns. The first column is readonly and the second column is not
and initialized with Zero's. The values in column two must be numeric. How
do I prevent the user from leaving an Empty set in the cell? I already have
a handler that ensures the user enters numeric values. I would like to
default to Zero if the user deletes a value or enters an empty set.

Thankyou,

Jeff
 
Hi,

Set the default value for the datacolumn.

http://msdn.microsoft.com/library/d...ystemdatadatacolumnclassdefaultvaluetopic.asp

Ken
--------------------
Here is one I am stuggling with:

I have a project I'm developing in VB .NET. I have a datagrid in a window
with two columns. The first column is readonly and the second column is not
and initialized with Zero's. The values in column two must be numeric. How
do I prevent the user from leaving an Empty set in the cell? I already have
a handler that ensures the user enters numeric values. I would like to
default to Zero if the user deletes a value or enters an empty set.

Thankyou,

Jeff
 
That was the first thing I tried. I believe the default value is for Null
values. I'm trying to default an Empty string. Is that the same thing?

My datasource is a Custom Collection. I'm not sure if that has an affect on
the behavior.
 
Back
Top