I have ASP.NET GridView in my web app and would like to bind two fields into one column and use string formatting. I am providing example below, is it possible to implement into GridView?
I have two data fields Name and DefaultParam and would like to display these fields into one GridView column.
Like this
Name=DefaultParam
If DefaultParam value is empty I would like to show only Name value and do not include =
I was using Repeater and code below to achieve this but now decided to move data display to GridView
<%#Eval("Name")%>
<%# (!string.IsNullOrEmpty(Eval("DefaultParam").ToString())) ? "= " + Eval("DefaultParam"):"" %>