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

Grid loses link on sorting

Thread ID:





88529 Jul 29,2009 12:02 AM UTC Jul 29,2009 04:38 PM UTC ASP.NET MVC (Classic) 2
Tags: Grid
Eric Swann
Asked On July 29, 2009 12:02 AM UTC

On my grid, I have basic link to an edit page as suggested in your "CRUD" example. However, as soon as I sort a column, all the links disappear and the text appears unformatted. How can the link state be maintained on sorting?

Balaji K [Syncfusion]
Replied On July 29, 2009 02:32 PM UTC

Hi Eric,

Thanks for evaluating Syncfusion products.

The Grid HTML content is replaced internally after the Sorting.
So only edit link not available after the sorting.

You can handle QueryCellInfoEvent in pagingsortingMapper Action method and the link has to be appended to the cell value

Please refer the following code snippet:

public ActionResult SortingAction()
IEnumerable data = new StudentDataContext().Student;
ActionResult result = data.GridActions();
GridHtmlActionResult engineSource = result as GridHtmlActionResult;
engineSource.GridModel.QueryCellInfo += (sender, args) =>
if (args.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell || args.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell)
/// Edit link is applied in Title column
if (args.TableCellIdentity.Column.MappingName.Equals("ID"))
/// Hyperlink is appended inside the cell value
args.Style.CellValue =+ args.Style.CellValue;


return result;

Please let us know if this helps.


Eric Swann
Replied On July 29, 2009 04:38 PM UTC

Yes, this did work!




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