learning difficulties dating - Gridview rowupdating oldvalues null

by  |  16-May-2015 19:27

The following example demonstrates this technique using a simple SQL command, although you could also perform the null check in the implementation of a stored procedure.

Note the use of the Append Data Bound Items property of the Drop Down List, which allows values obtained from the Drop Down List data source to be appended to the statically added "ALL" item in the Items collection.

You can also specify a Null Display Text property on Bound Field to specify a value for the field to display when the field value from the data source is returned as null.

If this value is not changed during edit mode, the value will roundtrip as null back to the data source during an Update operation.

Empty value will first be converted to null and subsequently to the default value.

You can use these null-handling properties to implement a Drop Down List filter that displays all values from the data source initially until a filter value is selected.

Only one of Empty Data Text and Empty Data needs to be set (Empty Data Template overrides when both are set).

Community Discussion