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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:48:32+00:00 2026-06-06T11:48:32+00:00

I have a datagridview displayed on the screen. The user can change the end

  • 0

I have a datagridview displayed on the screen. The user can change the end column called “Pareto” to any integer he/she likes. But there is a catch, all records are in a league.
The user also may wish to simply leave a number out and come back to it, so not allowing for a missing number isn’t possible.

Basically I need a method that checks if a column has a missing number from a non-sorted row, and also stores each number that’s missing into an array/list for me to output.

Normally I like these little logic questions But after the loops I’ve coded today my brain is burnt out… so any input would be great!

I originally thought about first getting the maximum records in the grid via count(no problem)

Then using it as the range from 1 – “maxCount”. Find all missing numbers. It sounded so simple until I thought about the fact it is not sorted.

Many thanks

  • 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-06T11:48:34+00:00Added an answer on June 6, 2026 at 11:48 am

    Not clear the real work-flow, but..

    The fact is that DataGridView is not sorted is a pure UI stuff. Your data can be sorted and binded to the DataGrid via DataView or any other intermidiate View layer.

    One time user inserts the value, you can execute binary-search (fastest available on sorted collection search) to find the value of interest.

    EDIT

    If you need to check the missed numbers among set of numbers from (1..500), first you can have all numbers sorted, like defined in my post in data-model.

    List<int> sortedAlreadyAvailableNumbers ... 
    

    after make

    var missingNumbers =  Enumerable.Range(1, 500).Except(sortedAlreadyAvailableNumbers );
    

    Hope this helps.

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

Sidebar

Related Questions

How can I display only selected headers in DataGridView control? For example I have
I have DataGridView with two columns. The first column is TextBoxCol(DataGridViewTextBoxColumn) and the Second
I have datagridview with checkbox column, but I want, that some of the columns
I have a datagridview with a column with checkbox in it. What I am
I have a datagridview bound to a datasource, column[0] AgencyName is a primary key
I have a datagridview on a windows form application. Application post all displayed data
I have a DataGridView with an image column. In the properties, I am trying
I have a DataGridView (called DataGridViewSecurity) in VB.net (Visual Studio 2010) which is bound
In C#, I have a table displayed using a DataGridView . The table is
I have a DataGridView with a user definable number of columns (anywhere from ~6-60)

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.