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.
Syncfusion Feedback

IGridColumnBuilder Format(string content) does not bind

Thread ID:

Created:

Updated:

Platform:

Replies:

109299 Jun 6,2013 09:46 AM UTC Jun 10,2013 01:13 PM UTC ASP.NET MVC (Classic) 1
loading
Tags: Grid
Wojciech
Asked On June 6, 2013 09:46 AM UTC

I have some problems with
IGridColumnBuilder<TListItemModel> Format(string content) method.

For some reasons I need to populate grid column with custom format:
columns.Add(String.Empty).Format(@Primoartis.GridEditActionLink()).Width(100).UnBound(true);

Helper method returns string, fomatted like:
" <a class="css-class" rel='nofollow' href="/controller/action?id={Id}></a>" "

but the value "{Id}" does not bind with proper value. TListItemModel has Id property.
When I write format html by hand, it works fine. But when I return it from static method, it does not.

What do I need to do?
Please help someone.

Abdul Matin M [Syncfusion]
Replied On June 10, 2013 01:13 PM UTC

Hi Wojciech,

 

Thanks for your interest in Syncfusion products.

 

I am afraid that I am unable to reproduce this issue with the given information. I have created a sample based on the code snippet you have given. You could use this sample and reproduce the issue if any. We have made this sample work on JSON Mode, we will be glad if you please let us know the mode in which you are interested in running the project. We are unable to use your Primoartis product instead we have used HTML ActionLink to resolve this issue. Could you please refer the below code snippet.

 

<div id="Target" style="width:100%;" class="sample-panel-margin">

    @(Html.Syncfusion().Grid<UnboundExample.Models.JSONOrder>("UnBoundColumn_Grid")

                    .ActionMode(ActionMode.JSON)

                    .Caption("Orders")

                    .EnablePaging()

                    .EnableSorting()

                    .AutoFormat(Skins.Marble)

                    .Column(column =>

                              {

                                  column.Add(p => p.OrderID).HeaderText("Order ID").TextAlign(TextAlignment.Right).Width(100);

                                  column.Add(p => p.CustomerID).HeaderText("Customer ID");

                                  column.Add(p => p.ShipCountry).HeaderText("Ship Country");

                                  column.Add(p => p.ShipCity).HeaderText("Ship City");

                                  column.Add("Delete").HeaderText("Delete Record").Width(120)

                                      .Format(@Html.ActionLink("Delete", "DeleteRecord", new { id = "{OrderID}" }).ToString());

                              }))

</div>

 

For your convenience we have attached the sample

Please try this sample and get back to us with more information, so that we can analyze that and provide the better solution.

 

 

Let us know if you have queries.

 

Regards,

Abdul Matin M


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

;