I am in the process of upgrading an older application that used the previous RADControls to use the ASP.NET AJAX Controls. I have a grid with 4 columns (many rows) and each column is a link button. When a link button is clicked i want to filter that column by whatever text the link button has. (many rows will have the same values). here is my old code for the ASP.NET controls and it worked fine:
here is one of my snippets from the RadGrid1_ItemCommand event (Fields/Columns changed for easy read):
| if (e.CommandName = "FilterCol1") { GridDataItem item = (GridDataItem)e.Item; |
| LinkButton lb = (LinkButton)item["Col1"].FindControl("btnCol1"); |
| string strFilter = lb.Text; |
| rgBOM.MasterTableView.FilterExpression = "([COL1_DATAFIELD] LIKE \'" + strFilter + "%\') "; |
| GridColumn column = RadGrid1.MasterTableView.GetColumnSafe("Col1"); |
| column.CurrentFilterFunction = GridKnownFunction.Contains; |
| RadGrid1.Rebind(); } |
i get an error on the rebind : Expression Expected