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 8673335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:26:00+00:00 2026-06-12T19:26:00+00:00

Trying a simple project to create my own (very basic) data binding. I have

  • 0

Trying a simple project to create my own (very basic) data binding.

I have a class FIELD_DESCRIPTOR which stores meta information about a database column. There will be a further class FIELD which represents the actual field, which will contain a reference to its corresponding FIELD_DESCRIPTOR class.

I am getting stuck in 2 places.

First, I need to have a property in the FIELD_DESCRIPTOR class that stores what kind of Windows Forms control the field is mapped to at the front end. for e.g. I need a property, say, MAPPED_CONTROL_TYPE. And I should be able to store either TextBox, ComboBox etc in this property. Should I just use a string property and be done with it ? Or is there a better way ? Ideally, I’d like to use some kind of enumeration of control types.

Secondly, I need to store a reference / handle to the actual control the field it mapped to. (I think I can do this by passing a reference of the actual control on the form.)

How do I implement this ? What kind of dataType should be used to define this property ?

(Using .Net 3.5, No WPF)

Thanks and regards.

  • 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-12T19:26:02+00:00Added an answer on June 12, 2026 at 7:26 pm

    First, I need to have a property in the FIELD_DESCRIPTOR class that
    stores what kind of Windows Forms control the field is mapped to at
    the front end. for e.g. I need a property, say, MAPPED_CONTROL_TYPE.
    And I should be able to store either TextBox, ComboBox etc in this
    property. Should I just use a string property and be done with it ? Or
    is there a better way ? Ideally, I’d like to use some kind of
    enumeration of control types.

    The fully qualified type name springs to mind, e.g. System.Windows.Forms.TextBox. This should be unique, and could always be used for dynamic creation if needed.

    Secondly, I need to store a reference / handle to the actual control
    the field it mapped to. (I think I can do this by passing a reference
    of the actual control on the form.)

    You could indeed store the reference using a type such as System.Windows.Forms.Control. If you do, be carefult that you don’t create a memory leak. i.e. When you control is no longer needed, you should no longer hold its reference in your lookup otherwise you will stop it being disposed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create a simple project with few stateless session beans.I have
I'm trying to create a simple project to pass some data between two view
I'm trying to create a simple custom validator for my project, and I can't
I have created a wpf vb.net project and am trying to set a simple
Ok, so I'm trying to finish our simple project for Data Strcutures but there
So, I'm currently working with JSF trying to create a simple project that takes
I am trying to create quite simple project. I will explain it on an
I m very new in spring batch project.I m trying to create a project
I'm prepping for a simple work project and am trying to familiarize myself with
I'm trying to run exec-maven-plugin 's exec:java goal on a simple two-module project where

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.