Not quite sure but a suggestion:
Are you talking about nulll in SQL column? In this case the SQLType.DBNull
is converted to 0 in a bound field. If you convert the bound field to a
template field you might be able to use a Label or TextBox control and
convert the 0 value in the OnPreRender event. This would presumably would
have ReadOnly set to true.
You might also be able to do something like:
<%#Eval("PriceRange")==DBNull.Value?"NoMax":Eval(" PriceRange")%>
although I'm not sure about using the Eval on the right side of the
conditional expression.
I think most developers would encourage you to use ObjectDataSource and do
the retrieval and conversion in the business object
"Microsoft News Group" wrote:
I am trying to make a column which is decimal format, convert nulls to a
certain string such as "No Max".
This is for a price range, and if they do not put a value in, a null value
is put in place, but displays "No Max", but if it is not null, then it would
display the decimal value in place. How can I do this in the gridview.