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.
Unfortunately, activation email could not send to your email. Please try again.

QueryCellInfo?

Thread ID:

Created:

Updated:

Platform:

Replies:

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

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 10:10 AM

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 5, 2011 11:29 PM

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.

Regards,
Sridhar N


sekhar
Replied On March 11, 2013 09:49 AM

http://www.syncfusion.com/support/forums/grid-mvc/100730..

 

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 06:14 AM

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:

 

 [AcceptVerbs(HttpVerbs.Post)]
        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.

 

Regards,

Eswari S


CONFIRMATION

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.

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.

;