I have a radgrid where I generate a template column which has a checkbox as it's itemtemplate. The checkbox is checked in the codebehind if another field is prefixed with certain characters. I have included the code below. I want to know if there is a way to filter this column either saying is checked, or even is not empty?
Here is the aspx:
and here is the c#:
Thanks
Here is the aspx:
| <telerik:GridTemplateColumn UniqueName="webLinkedContent" HeaderText="Web linked" > |
| <ItemTemplate> |
| <asp:CheckBox ID="webLinkedContent" Enabled="false" runat="server" /> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
| protected void sourcesGrid_itemDataBound(object sender, GridItemEventArgs e) |
| { |
| if ((e.Item is GridDataItem)) |
| { |
| GridDataItem dataItem = (GridDataItem)e.Item; |
| string psSourceCd = ((System.Data.DataRowView)(((Telerik.Web.UI.GridItem)(dataItem)).DataItem)).Row.ItemArray[9].ToString(); |
| if (psSourceCd.Length > 4) |
| { |
| string beginning = psSourceCd.Substring(0, 4); |
| if (beginning == "SPD_") |
| { |
| CheckBox chkbx = dataItem["webLinkedContent"].FindControl("webLinkedContent") as CheckBox; |
| chkbx.Checked = true; |
| } |
| } |
| } |
| } |
Thanks