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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Conditional formatting in Version: 7.403.0.20

Thread ID:

Created:

Updated:

Platform:

Replies:

91286 Nov 12,2009 05:35 AM UTC Nov 12,2009 10:46 AM UTC ASP.NET MVC (Classic) 1
loading
Tags: Grid
Henryk Schneider
Asked On November 12, 2009 05:35 AM UTC

Hi,

I've been trying to implement something where I can display either a check box or a small image of some sort in the grid. All samples and documentation I've looked at suggest using the QueryCellInfo method of the GridPropertiesModel, but I can't seem to get it to work, the method doesn't seem to exist. The rest of my grid displays and works fine, just need some extra formatting to make some of the information in the grid easier on the users.

Any help is much appreciated.

Regards,
Henryk.

Balaji M [Syncfusion]
Replied On November 12, 2009 10:46 AM UTC

Hi Henryk,

Thank you for your interest in Syncfusion products.

Our Essential Grid have been revamped to provide an enhanced support to extensive client side functionality. Due

to revamping the QueryCellInfo event is removed from GridPropertyModel. Instead of the QueryCellInfo we can

achieve the formatting data through Format API & CssClass API in view.

Format API in Grid provides you a support for formatting your column data. In this format we can do all the

string formatting.

Css API in Grid Provides you a support for adding css class to GridColumn.

Syntax: Format

column.Add(ColumnMapping).Format("format option");

Syntax: CssClass

column.Add(ColumnMapping).CssClass("CssClassName");

Refer the below code snippet, which illustrates this.



<%=Html.Grid("Grid1", "GridModel", column => {
column.Add(c => c.CustomerID).HeaderText("CustomerID").Format("ID : {CustomerID}");
column.Add(c => c.EmployeeID).HeaderText("Employee ID");
column.Add(c => c.OrderID).HeaderText("Order ID");
column.Add(c => c.OrderDate).HeaderText("Order Date").Format("{OrderDate:MM/dd/yy}");
column.Add(c => c.ShipCity).HeaderText("ShipCity").CssClass("CustomData");
column.Add(c => c.ShipCountry).HeaderText("ShipCountry");
})%>


Note : RegisterClientResourceManager has been updated by RegisterStaticResources. We suggest to you use

RegisterStaticResource to work in new MVC Grid.

Add the Resource Manager to the Site.Master page under the tag as follows.


.....

<%=Html.RegisterStaticResources() %>


Please refer the sample from the below link

http://files.syncfusion.com/support/grid_mvc/Incidents/v7.4.0.20/F91286/MVC_GridSample.zip

We would also suggest you to refer the below documentation link for more details.

http://help.syncfusion.com/ug_74/GridMVC/defaultMVC.html

Please let me know if you have any concerns.

Regards,
M. Balaji.


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.

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

;