I want have two columns and based on a condition, include or remove a third. using all the if statements seems a bit redundant. Is there another way to do this?
Copy
But if you want to remove the entire column, rather than inhibiting the display of the values, then if statements are perfectly fine.
if you are using table then hide the column showing Other value:
<% for(......){
//evaluate here if you will show it or not?var showOther = Age > 18 ? "block":"none";
%>
<tr><td>..</td><td>..</td><tddisplay="<%= showOther %>">..</td></tr>
<% }%>
Share
Post a Comment
for "How Do I Remove A Table Column In Mvc?"
Post a Comment for "How Do I Remove A Table Column In Mvc?"