Show TOC

How to Remove Mapped PropertiesLocate this document in the navigation structure

This is an example showing how to remove and delete mapped properties from the generated code for your Excel application.

Prerequisites

You have generated code for an Excel add-in application using the GWM Excel add-in wizard.

Context

The example contains code snippets, and also shows how to remove an existing column in your Excel add-in application.

Procedure

  1. From the Solution Explorer, open the class, Start of the navigation path Excel  Next navigation step  ExcelManager  Next navigation step  ExcelDataManager.cs End of the navigation path
  2. Go the method, CreateExcelBindingTable and delete the column.
    Example For example, delete following line:
    this.ExcelDataTable.Columns.Add(GetDataColumn("Street", "System.String")); 
  3. Go the method, BindExcelTableWithRecords, and delete the column for data binding.
    Example For example, delete following line:
    dataRow["Street"] = entity.Street; 
  4. Rebuild and test your generated project for the ExCel add-in application.
    Note Deleting some columns may have an effect on the Create, Update, and Delete functionality in the Excel add-in application, as the deleted column may be relevant for a functionality.