0

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.

Shah
  • 1,404
  • 4
  • 16
  • 32
  • You have to implement custom converter to check value for null or to compare data in column. Look here http://stackoverflow.com/questions/356194/datatrigger-where-value-is-not-null – opewix Sep 12 '12 at 06:24

2 Answers2

1

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.

Yuriy Rozhovetskiy
  • 21,488
  • 4
  • 32
  • 62
0

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

Divi
  • 7,451
  • 13
  • 41
  • 60