Premmerce Documentation > Table or Grid > How to Add Hyperlink to a Column Text

About Premmerce

Introduction

Full Features

Installation

Prerequisite

Setup & Installation

Table or Grid

Basic Usage

Disable Column Sorting

Disable Column Export

Change Search Placeholder

Custom Column Template

Add Buttons to Action Column

Hyperlink Column Text

Specific Roles to View Column

Add or remove column

Filter column

CSS and JS

Edit Color

File validation

General

Password Validation

Bulk Import

Other

It’s easy. Let’s go! The steps:

  1. You can refer to /Helpers/TableConfig.cs > BlogCategoryTableConfig
  2. Set the Hyperlink value. You can also set whether to open in new tab (HyperlinkInNewTab).
public static List<ColumnProperty> TableColumns = new List<ColumnProperty>() {
     new ColumnProperty { HeaderKey =nameof(BlogCategoryViewModel.Name), Hyperlink = $"/blogcategory/[{nameof(BlogCategoryViewModel.UrlSlug)}]", HyperlinkInNewTab=true },
     new ColumnProperty { HeaderKey =nameof(BlogCategoryViewModel.CreatedByName)},
     new ColumnProperty { HeaderKey =nameof(BlogCategoryViewModel.CreatedOn),IsDateTimeColumn = true,ColumnMinWidth="120" }
    };

<aside> ✨

There is another method that can add a hyperlink to the column text. It’s by using the custom HTML template method, which is stated in this page:

</aside>