Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9270595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:24:35+00:00 2026-06-18T15:24:35+00:00

I am working on an application that reads three Excel files into DataTables. They

  • 0

I am working on an application that reads three Excel files into DataTables. They are called Variants, Kits and Parts. Variants and Kits are connected with a DataRelation, as are Kits and Parts.

In one part of the program I use a DataGrid control to show the contents of the entire Variants table through a DataView. The problem is that after all the actual columns in the Variants table, the DataGrid shows one final column called VariantsKits, which is the name of the DataRelation between the Variants and Kits tables.

What can I do to not show this? I use AutoGenerateColumns since I don’t know exactly which columns are in the imported Variants Excel file.

Any advice would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T15:24:37+00:00Added an answer on June 18, 2026 at 3:24 pm
    // You might have to add a reference to the dll first)
    using System.ComponentModel.DataAnnotations;
    
    [Display(AutoGenerateField = false)]
    public PropertyType ThisIsThePropertyYouDontWantToShowUp { get; set; }
    

    A second option would be to hook into the AutoGeneratingColumn event on
    the DataGrid and have it cancel for the column you don’t want

    private void DataGrid_AutoGeneratingColumn(
        object sender, DataGridAutoGeneratingColumnEventArgs e)
        {
            if (/* do a check on e.PropertyName or e.PropertyType*/)
                e.Cancel = true;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i m working on a web application that reads files from some where and
I'm working on a windows forms application that reads and displays source code files
I am working on an application that imports an unmanaged dll into C#. It
I'm working on an application that accepts TCP connections and reads in data until
All, I'm working on an application that allows authorized users to upload Excel spreadsheets
Working on application that reads emails. Is there a way besides webdav to get
I am working on a C# WinForms application that reads/writes data to/from a hardware
I am working on an application that reads media from the sd-card and plays
I'm working on an application that reads and writes binary data from and to
Urgent Help Reqired!!! I am working on an ASP.NET Webforms application that reads MS

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.