How can I set the Row filter to a value so when the form loads it filters by that colu开发者_Go百科mns value in devexpress gridview.
I thought you were using the ASPxGridView. If you are using a Winforms grid, the code should be:
gridView1.ActiveFilterCriteria = new DevExpress.Data.Filtering.BinaryOperator("Status", "P");
Here is the code which should work for you:
protected void Page_Load(object sender, EventArgs e)
{
ASPxGridView1.FilterExpression = "[CategoryName] = 'Beverages'";
}
精彩评论