Current filter:
                                You should refresh the page.
                                Support Center
                                  • How do I add a link as a field (column) in the new grid view. I am working in MVC razor. I did the following code but it is giving error.

                                     settings =>
                                    var myColumn = settings.Columns.Add("Link name","#");myColumn.SetDataItemTemplateContent(c =>
                                    (DataBinder.Eval(c.DataItem, "Advisor").ToString(), "Details", new { id = DataBinder.Eval(c.DataItem, "userId") });


                                1 Solution

                                Creation Date Rating Importance Sort by


                                Your code should be as follows:

                                settings.Columns.Add(column => { column.FieldName = "YourFieldName"; column.Caption = "YourCaption"; column.ColumnType = MVCxGridViewColumnType.HyperLink; var hyperLinkProperties = column.PropertiesEdit as HyperLinkProperties; //Specify hyperLinkProperties here });

                                If you wish to specify content of the DataItem template, refer to the GridView - How to track changes made with an unbound CheckBox in the DataItemTemplate example

                                See Also:

                                • Priyesh DR 08.07.2012

                                  Thanks. It worked.

                                If you need additional product information, write to us at or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2017 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners