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

Add a column with the Add(string mappingName) method

Thread ID:





101919 Dec 5,2011 08:31 AM UTC Dec 5,2011 01:04 PM UTC ASP.NET Web Forms (Classic) 1
Tags: GridGroupingControl
Asked On December 5, 2011 08:31 AM UTC

Hi all,

I have a MVC typed grid, but I don't know the type (it looks like Html.Syncfusion.Grid where T:class).

So I can't use lambda expression to add columns, I"m looking on the Add(string mappingName) method.

For example, if I have a grid of customers which contains a name property, I would like add the column like this:

column => column.Add("Name"). I can't do column=>column.Add(c=>c.Name), because I don't know the type of my datas, and I don't have to know it.

But it doesn't work ! I have empty cells...

Thanks for your help.

Eswari S [Syncfusion]
Replied On December 5, 2011 01:04 PM UTC

Hi SebFrance,

Thank you for using Syncfusion products.

Query #1 : , I"m looking on the Add(string mappingName) method

Your requirement can be achieved by specifying the “MappingName” of the column. And also we need to set the Unbound as false for those columns.

. . . . .
. . . .
.Column(col =>
//set UnBound as false , otherwise columns will be treated as unbound column and it will empty without any data's



For your convenience , we have prepared the sample and the same can be downloaded from the following link :


Note: If you want to run the sample in MVC3, change the configuration manager as Debug_MVC3/Release_MVC3.To briefly know about that steps please kindly refer this document link.

How to Switch between MVC2 to MVC3

Please try this and let us know if you need any further assistance.



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