(nulls) display problem in datagrid new row
-
I have a Datagrid that is bound to a typed dataset that is loaded from a SQL database. While typing data in a new row on grid the other column cell values all contain the value "(null)".I cannot present something like this to a client. Is there any way of formatting the new row to present empty or default values ?
-
I have a Datagrid that is bound to a typed dataset that is loaded from a SQL database. While typing data in a new row on grid the other column cell values all contain the value "(null)".I cannot present something like this to a client. Is there any way of formatting the new row to present empty or default values ?
Jazeker: My solution to this problem is to write a function ReplNull which returns a default when a value is Null:
Public Function ReplNull(ByVal varSource As Variant, _ ByVal varReplaceBy As Variant) As Variant If IsNull(varSource) Then ReplNull = varReplaceBy Else ReplNull = varSource End If End Function
Or use the CASE WHEN clause in your SQL statement to replace Nulls by your default. grtz, Guus