The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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?
BKBalaji K Syncfusion Team 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:
[C#] [AcceptVerbs(HttpVerbs.Post)] 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;