Reputation: 1654
I need to show a checkbox in the DataList if a particular column in the binded Data Source is having a particular value.
Means look for a particular value. if exist then show checkbox else dont show.
Upvotes: 0
Views: 420
Reputation: 7701
You can do something like this in your aspx page:
<% if(valueToCheck == columnValue) {%>
<add checkbox here>
<% } %>
I haven't tried this, but it gives you the basic idea
Upvotes: 0
Reputation: 22468
Handle the DataList.ItemDataBound event to get checkbox control and set Visible
to false
or hide with display:none
style when it doesn't needed.
Upvotes: 1