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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:33:44+00:00 2026-05-25T12:33:44+00:00

This is my first C# project, using VS 2008 and .NET 3.5, required by

  • 0

This is my first C# project, using VS 2008 and .NET 3.5, required by the client.

I have a List of type GradeVO

This is my connection and where I’m setting values to a DataGridView

DataSet ds = new DataSet();
SqlConnection Conexao = new SqlConnection(@"Data Source=localhost; Initial Catalog=usr_mmidia; User ID=usr_mmidia; Password=123; MultipleActiveResultSets = true");
Conexao.Open();
SqlDataAdapter da = new SqlDataAdapter("MAG_SP_LISTA_SETORES_SQL", Conexao);
da.SelectCommand.Parameters.Add(new SqlParameter(("@p_codfil"), @"500"));
da.SelectCommand.Parameters.Add(new SqlParameter(("@p_categoria"), categoria));
da.SelectCommand.CommandType = CommandType.StoredProcedure;
DataTable t = new DataTable();
da.Fill(t);
dgNivel1.DataSource = t;

This code is working but I need the DataSource to receive a list of GradeVO, is it possible?

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-25T12:33:45+00:00Added an answer on May 25, 2026 at 12:33 pm

    you could always do something like :

    var myDataSource = t.Select(row => new GradeVO 
                                           {
                                               //your initialization logic here to get 
                                               //stuff from the row into the object
                                           });
    dgNivel1.DataSource = myDataSource;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a CMS project using ASP.Net 3.5/Visual studio 2008.This is the
I have a Visual Studio 2008 C# .NET 3.5 project using MySql 5.1.53 and
First, a couple operating parameters: .NET development using Visual Studio 2005/2008 TortoiseSVN client I've
This is my first serious project using NHibernate and I have setup log4net to
Using Dozer to map two objects, I have: /** /* This first class uses
I have a SQL file added to my VS.NET 2008 project as an embedded
ActiveX Info - This ActiveX Control is Implemented using C#, VS 2008, .Net Framework
This is my first project that i need to use some database ( using
I am writing an ASP.NET web application using Visual Studio 2008. The project is
This is my first project using a NoSQL database and I am wondering how

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.