开发者

Setting The Rowfilter On Load

开发者 https://www.devze.com 2023-01-23 12:16 出处:网络
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 Winform

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'";
}
0

精彩评论

暂无评论...
验证码 换一张
取 消