We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

QueryCellInfo and Filtering

I'm using QueryCellInfo to change the style of cells in one column. Cells that contain a negative value to red and bold and those that have a threshold/caution value to yellow. This works OK except when the user filters by that column. When they do this filtering, the style information is lost. How can I get the style information to 'stick' when the user filters on the column's value?

1 Reply

SD Sandhya D Syncfusion Team October 15, 2013 11:35 AM UTC

Hi frank,

Thanks for your interest in syncfusion products.

We suspect that the cause of the issue might be ,because of not adding "QueryCellInfo" in post action,this can be avoided by adding " engineSource.GridModel.QueryCellInfo = QueryAction;" to your post action.Please refer the code below.

public ActionResult WebgridSample1(PagingParams args)
            var data = new ProductDetails().Product.ToList();
            ActionResult result = data.GridActions<Product>();
            var engineSource = result as GridHtmlActionResult<Product>;
            engineSource.GridModel.QueryCellInfo = QueryAction;
            return engineSource;

We have attached sample for your reference.Please get back to us if you need further assistance.




Live Chat Icon For mobile
Up arrow icon