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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:18:36+00:00 2026-06-13T19:18:36+00:00

In my application I am trying to use RowFilter or Select methods of DataSet

  • 0

In my application I am trying to use RowFilter or Select methods of DataSet to show the values selected by the User in ComboBox. The DataSet has five columns hence my project has five ComboBoxes populated with same values of columns of DataSet respectively. Now I am trying to search the user selected values in the DataSet and populate in DataGridView. I have tried the below: (not working)

dgvMain.DataSource = null;
dgvMain.DataSource = dsMainDoctors.Tables[0].Select("Name = '" + cmbDoctorName.Text +"'");

or

dgvMain.DataSource = null;
dgvMain.DataSource = dsMainDoctors.Tables[0].DefaultView.RowFilter = "Name = '" + cmbDoctorName.Text + "'";

The first attempt is not showing anything but the second one is showing something like the below image instead of showing columns. Here I am trying to search with only one column value, but I need to search with three different columns of DataSet how to do that?

enter image description here

I know I am doing something wrong in my code. please suggest what should I do to correct my code. Please no linq because it is restricted by my head members. but all type of anwswers are welcome.

  • 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-13T19:18:37+00:00Added an answer on June 13, 2026 at 7:18 pm

    You could try to assign the defaultview, after the filtering action, to the datasource

    dgvMain.DataSource = null;
    dsMainDoctors.Tables[0].DefaultView.RowFilter = "Name = '" + cmbDoctorName.Text + "'";
    dgvMain.DataSource = dsMainDoctors.Tables[0].DefaultView;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Spring MVC application trying to use a rich domain model, with
I am trying use gem tire to search in my application. I have tables
I am trying to use FIX::Application along with SessionSettings. The Fix server I am
I am trying to use SSE instruction in Windows form application in VS 2010.
I am trying to use the backbone architecture in my MVC application. I created
I am trying to use a .NET service in Android Application using the ksoap2
I am trying to use a .NET webservice in my application where the service
I'm trying to use libsvm for a certain complex application and, because libsvm is,
I'm trying to use Youtube apis in my web application by following this guide
I'm trying to use dll in my java application in eclipse, but I'm getting

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.