Hello,
I've created a Gridview strictly for as a user maitenance page. I'm trying to get one of the columns so that it automatically filters the disabled column to 'N'. I've looked through all the tutorials and documentation and followed them exactly. I'm still receiving an error out of know where. Can anyone help me with this? Here is my code.
.cs
I've created a Gridview strictly for as a user maitenance page. I'm trying to get one of the columns so that it automatically filters the disabled column to 'N'. I've looked through all the tutorials and documentation and followed them exactly. I'm still receiving an error out of know where. Can anyone help me with this? Here is my code.
.cs
protected void RadGrid1_PreRender(object sender, System.EventArgs e)
{
if (!Page.IsPostBack)
{
RadGrid1.MasterTableView.FilterExpression =
"([disabled_ind] LIKE \'%N%\')";
GridColumn column = RadGrid1.MasterTableView.GetColumnSafe("disabled_ind");
column.CurrentFilterFunction =
GridKnownFunction.Contains;
column.CurrentFilterValue =
"N";
RadGrid1.MasterTableView.Rebind();
}
}
I'm using a SqlDataSource didn't know if this might be an issue. Any help would be greatly appreciated because I keep getting the error "Expression needed" when its exactly as the documentation and tutorials say.