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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:50:13+00:00 2026-06-01T20:50:13+00:00

i fill sorted list from ordered datatable but after fill sorted list my order

  • 0

i fill sorted list from ordered datatable but after fill sorted list my order changing

     for (int i = 0; i < d.Rows.Count; i++)
        {
              int EmpID = Convert.ToInt32(d.Rows[i]["Fd_Emp"].ToString().Trim());
            string type=d.Rows[i]["Fd_Type"].ToString().Trim();
            emp.Add(EmpID, type);

        }

my datatable order is 31e,32e,33e,7i

my sortedlist order become 7i,31e,32e,33e

how to keep my datatable order in my sorted list

  • 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-01T20:50:15+00:00Added an answer on June 1, 2026 at 8:50 pm

    The idea of using a sorted list is that it keeps the added elements in a sorted order. This means that if the elements in the database are not sorted (or not sorted the same way as the sorted list sorts) the elements in the sorted list will have a different order

    If the values in the DB are sorted and you want to get the same ordering from your sorted list, you can provide a custom sorting method for your elements, in which you duplicate the comparison logic that the DB uses for its values.

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

Sidebar

Related Questions

I am trying to fill a form in a php application from a C#
How do you fill out a particular column of a DataTable (say, a uniqueidentifier)
I simply want to fill-up cells in my spreadsheet from a VBA function. By
There is a List[List[Int]] of prime factors for integers 2..12: List(List(2), List(3), List(2, 2),
I fill a form fields (in pygtk) from a class instance that contains its
I need to fill a UITableView from an NSSet data source. Obviously I want
i fill a tdictionary , read from a file, to iterate over the key-value-pairs.
I would like to fill a select box with year starting from 1950 to
I thought I had this one sorted but I have run into a snag.
I fill a collection one single time when my J2EE webapp starts. Then, several

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.