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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback


Thread ID:





100730 Aug 30,2011 07:49 PM UTC Mar 12,2013 10:14 AM UTC ASP.NET MVC (Classic) 4
Tags: Grid
Greg Clouston
Asked On August 30, 2011 07:49 PM UTC

Does anyone have an example of using the "QueryCellInfo" property in the grid from the view definition?

We were forced to move from using the "GridPropertiesModel" do define our grid in order to use the built-in hierarchical grid. With the "GridPropertiesModel" it was simple matter of assigning the address of the desired function.

Greg Clouston
Replied On August 31, 2011 02:10 PM UTC

I found an example in the online help (http://help.syncfusion.com/ug_93/User%20Interface/ASP.NET%20MVC/Grid/index.htm). The example works some of the time. The problem I have found with the example is that it only works on the initial load of the grid. After each grid event (paging) the code in the "QueryCellInfo" doesn't fire.

Is there anyway I can set the "QueryCellInfo" via "GridPropertiesModel" and use the hierarchical grid at the same time?

Sridhar N [Syncfusion]
Replied On September 6, 2011 03:29 AM UTC

Hi Greg,

Thanks for your interest in Syncfusion products.

We have answered your query in your incident #84336. Could you please follow up in the incident.

Please let us know your concerns.

Sridhar N

Replied On March 11, 2013 01:49 PM UTC



Please find my query at above link.

I need to look into incident #84336 for my problem.

Please Assisy

Eswari S [Syncfusion]
Replied On March 12, 2013 10:14 AM UTC

Hi Sekhar,


Thank you for using Syncfusion products.


We have prepared the sample for the mentioned requirement in the forum. Please find the sample from the following link:


http://www.syncfusion.com/downloads/Support/DirectTrac/84336/Hierarchy MVC-846022335.zip


Please refer to the following code snippets:


        public ActionResult Hierarchy(PagingParams args)
            var data = (IList<Data>)System.Web.HttpContext.Current.Session["data"];
            var result = data.GridActions<Data>() as GridHtmlActionResult<Data>;
//Querycell Event Need to hook on action [post] (like paging/sorting ,etc) 
            result.GridModel.QueryCellInfo = QueryAction;
            return result;
        public void QueryAction(GridTableCell<Data> cell)
            if (cell.TableCellType == GridTableCellType.RecordFieldCell || cell.TableCellType == GridTableCellType.AlternateRecordFieldCell)
                if (cell.Column.MappingName == "Img")
                    cell.Text = "<img style='height: 90px; width: 120px;' src='/Content/Images/" + cell.Text + ".png'>";


Please try this and let us know if you have any queries.



Eswari S


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon