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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:10:19+00:00 2026-05-24T13:10:19+00:00

I have an object that will populate a grid with the ability to delete

  • 0

I have an object that will populate a grid with the ability to delete via a check box. The problem is that the objects are Grouped by a few properties which are common between them when they are created. For example I have the object

public class GroupedObject
{
    Name { get; set; }
    Level { get; set; }
    Assignment { get; set; }
    AssignmentDate {get; set; }
}

in this example when I save GroupedObjects from the gui, I have multiple objects with the Name property set differently, but Can assign them the same Level, Assignment, and AssignmentDate . So those three properties make the batch unique. I was wondering what the best way to create a unique identifier that groups those three pieces of information. I was thinking of something along the lines of

public class GroupedObject
{
    ....
    public int BatchId
    {
        var batchString = string.format("{0}{1}{2}", Level, Assignment, AssignmentDate);
        return batchString.GetHashCode();
    }
}

This way on the grid I have a way of having something rendered in the background so that when I select one item in the group, the “batch of items” is selected.

Is there an alternate/standard way of handling something like this or is it up to the implementer.

  • 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-24T13:10:20+00:00Added an answer on May 24, 2026 at 1:10 pm

    As far as I know there is no standard way of doing what you want, so pretty much up to the implemnter.

    The only issue I have with your implementation is the creation of a string – you could probably do better by getting the hash codes of all members that are part of the composite ID and generating a different hash code from them. See this post for ideas.

    Note:

    If performance is an issue for you (large amounts of data bound to a grid), you should test different algorithms to see what works best for your situation.

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

Sidebar

Related Questions

I want a Python object that will monitor whether other objects have changed since
I have a UIImageView object that when clicked it will play a animation, I
A lot of the time I will have a Business object that has a
If I have a reference to an object: var test = {}; that will
We have a COM object implemented with C++/ATL that includes a method which will
I have two tables: object that has object_id column and avalues that have object_id
I have an object that is mapped to a cookie as a serialized base-64
I have an object that implements IDisposable that is registered with the Windsor Container
I have an object that needs a test if the object data is valid.
I have an object that starts a thread, opens a file, and waits for

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.