Premmerce Documentation > Table or Grid > Disable export a column, hide from exported files

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. Go to Helpers folder > TableConfig.cs file

  2. Scroll to the specific TableConfig class

  3. Add Exportable = false to that column

  4. In the example below, the Description column is not exportable, and it will be hidden from the exported files like Excel, CSV, PDF, and DOCX.

public static class ImpactTableConfig
{
    // Specifies the columns to display in the table
    public static List<ColumnProperty> TableColumns = new List<ColumnProperty>() {
        new ColumnProperty { HeaderKey = nameof(ImpactViewModel.Ordering) },
        new ColumnProperty { HeaderKey = nameof(ImpactViewModel.Name) },
        new ColumnProperty { HeaderKey = nameof(ImpactViewModel.Description)**, Exportable = false** },
        new ColumnProperty { HeaderKey = nameof(ImpactViewModel.CreatedOn), IsDateTimeColumn = true, ValueKey = nameof(ImpactViewModel.IsoUtcCreatedOn)}
    };
}