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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:17:36+00:00 2026-05-11T21:17:36+00:00

In our application, we are going to have several finder dialogs. The UI of

  • 0

In our application, we are going to have several finder dialogs. The UI of a finder dialog is simple (text box, datagridview result, ok button, cancel button). The only real change between the different dialogs is some label text and the grid binding source. We want to enforce certain properties (like full row selection and read only mode) and events (like click and double click) so that when someone wants to add a dialog, we know that the user will get consistent behavior because that dialog implements the same properties and events that every other dialog in our application implements.

I created a base finder form that hosts some properties and the ok/cancel buttons + their click events. I’m stuck on the datagridview. What would be the best approach to ensure that all the datagridviews share similar characteristics when on one of our finder dialogs?

  • 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-05-11T21:17:36+00:00Added an answer on May 11, 2026 at 9:17 pm

    Today I implemented a custom grid (DataGridViewFinder) that descends from DataGridView. This grid is specific to our finder dialogs only. The grid has default properties set so that it is consistent with all of our other finder grids. Also, because I know that this type of grid will only be on a finder dialog, I’ve overridden some events that will set properties and call methods on the base finder.

    I like this approach because it ensures that when I drop my custom grid on a finder dialog, that certain properties and events are already handled for me. There will be many finder dialogs and I suspect this will save a lot of time. Does anyone see anything wrong with this implementation?

    protected override void OnEnter(EventArgs e)
    {
        base.OnEnter(e);
        if (Parent is BaseFinder)
        {
            (Parent as BaseFinder).Mode = FinderMode.Ok;
        }
    }
    
    protected override void OnDoubleClick(EventArgs e)
    {
        base.OnDoubleClick(e);
        if (Parent is BaseFinder)
        {
            (Parent as BaseFinder).btOk_Click(this, e);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hi folks we do have a video file in our application,every thing is going
I'm currently going through the process of running FxCop through our application that has
I'm creating a reporting application, and our customers are going to need to generate
Our application is a Java-GWT application that uses Guice-Persist and Guice-Servlet extensively. We have
Our application takes text from a web form and sends it via email to
One of our teams is going to be developing an application to store records
We have this huge application that has 18 projects in our source control (
Our web application is going to be deployed as part of a system with
We are going to migrate an application to have it support Unicode and have
currently we have quite a chunky auditing system for objects within our application, the

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.