I have an ASP.NET GridView in my web application and you want to link two fields into one column and use row formatting. I provide an example below, is it possible to implement it in a GridView?
I have two data fields Name
and DefaultParam
and would like to display these fields in one GridView column.
Like this
Name=DefaultParam
If the DefaultParam value is empty, I would like to show only the Name
value and not include =
I used Repeater and the code below for this, but now I decided to transfer the data display to the GridView
<%#Eval("Name")%> <%# (!string.IsNullOrEmpty(Eval("DefaultParam").ToString())) ? "= " + Eval("DefaultParam"):"" %>
Tomas source share