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

How to show link column in Grid using Razor views

Thread ID:

Created:

Updated:

Platform:

Replies:

101958 Dec 8,2011 11:19 PM UTC Dec 13,2011 04:41 PM UTC ASP.NET MVC (Classic) 1
loading
Tags: Grid
Rajesh Jiniwal
Asked On December 8, 2011 11:19 PM UTC

Hello,

I am trying to show one of grid column as link column. I found the sample for .aspx page as below

column.Add("Delete").HeaderText("Delete Record").Format("Delete");

but how can I format same in Razor view?

I tried to use same code in razor view but it didn't work. A quick reply will be appreciated.

Thanks
Rajesh




Eswari S [Syncfusion]
Replied On December 13, 2011 04:41 PM UTC

Hi Rajesh,

Thank you for using Syncfusion products.

We have prepared the sample for your requirement with Unbound column and the same can be downloaded from the following link:

Sample-1107725.zip

Please refer to the following code snippets:

@( Html.Syncfusion().Grid("SampleGrid")
.Datasource(Model)
.Caption("Orders")
.Column(col =>
{
. . . .
col.Add(c => c.OrderDate);
col.Add(c => c.ShipCountry);

col.Add("Delete").HeaderText("Delete Record").Format("Delete"); // hyperlink column which is directed to DeleteRecord action in home controller.

})

)

Also, we would request you to check our online Sample link:

http://mvc.syncfusion.com/sfmvcsamplebrowser/9.4.0.62/Grid_MVC/Samples/4.0/Razor/GettingStarted/UnBoundColumn

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

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.

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

;