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

  • Home
  • SEARCH
  • 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 3391564
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T03:49:02+00:00 2026-05-18T03:49:02+00:00

I have an already created DataTable object which i am using for my girdview

  • 0

I have an already created DataTable object which i am using for my girdview (asp.net) i also need to bind a column of that object to a DropDownList. The datatable has the correct details in the column but the column contains more that 1 of the same name in the column – hence I would love to just do some kind of SELECT DISTINCT on the datatable and copy it to a new datatable for use with binding the dropdown.

This would allow me to save resources by making another trip to the database.

Here is an example, the current datatable has a column called items and in this column has the following entries

1
1
1
1
5
5
6

And of course i need only unique items for binding to my dropdown, hence i need the following data

1
5
6

Of course i don’t want to change the original datatable object but rather make a copy of it will the new details

Any ideas if this is possible ? Or do i need to make another trip to the db?

thanks in advance

  • 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-18T03:49:03+00:00Added an answer on May 18, 2026 at 3:49 am

    DataTable dt = new DataTable();
    dt = dsMobileInfo.Tables[0].DefaultView.ToTable(true, “ColumnName”);

    //Applying the dvResult data set to the Grid
    for(int i=0;i

    Hope This will work for you.

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

Sidebar

Related Questions

Assuming that you already have created an oauth client app in twitter, you can
I have a repository which I have already cloned from Subversion. I've been doing
In .NET I have already tried the configuration below successfully: <system.net> <connectionManagement> <add address=*
I have a data table which already has some values, plus it is getting
I'm just beinning basic data driven ASP.NET webforms design. I have the first part
I have created sample application that insert 12 rows in tableview.And inserted fine.When after
I'm new to Eclipse/Java/Android I have already created this project, but I wanted to
i have a input tag which is non editable, but some times i need
I have already posted something similar here but I would like to ask the
I have already tried PreRenderComplete and unload is too late

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.