Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. BindingSource and DataSet

BindingSource and DataSet

Scheduled Pinned Locked Moved C#
questioncsshelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mfcuser
    wrote on last edited by
    #1

    I am using a commercial grid to display my data. I don't have any problem to display the whole table to the grid. For instance, the following code displays a whole table to the grid. grid1.SetDataBinding(table1BindingSource); Now, I only want to display the FirstName and the LastName I have the following in my form table1BindingSource and db1DataSet From db1DataSet, I can see the following by intellicense; my table names Tabl1 from intellicense I can see Table1.FirstNameColumn and Table1.LastNameColumn; My question, how can I use table1BindingSource and db1DataSet to display only the firstname and the lastname rather than the whole table?

    L M 2 Replies Last reply
    0
    • M mfcuser

      I am using a commercial grid to display my data. I don't have any problem to display the whole table to the grid. For instance, the following code displays a whole table to the grid. grid1.SetDataBinding(table1BindingSource); Now, I only want to display the FirstName and the LastName I have the following in my form table1BindingSource and db1DataSet From db1DataSet, I can see the following by intellicense; my table names Tabl1 from intellicense I can see Table1.FirstNameColumn and Table1.LastNameColumn; My question, how can I use table1BindingSource and db1DataSet to display only the firstname and the lastname rather than the whole table?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      You could use the Query Builder. Assuming you are using C# Express Edition, this "in-built" help page from the C# help file that installs with the C# express edition will show you how. There are also related help pages you might like to read! There are other ways to achieve the desired result but for a novice, this might be the easiest way. ms-help://MS.VSExpressCC.v80/MS.NETFramework.v20.en/dv_vdt01/html/815a30ce-6fb1-4611-bf43-bedd2020c443.htm Although you are wanting to program in C#, the question is about database. Try posting database questions in the correct forum.

      1 Reply Last reply
      0
      • M mfcuser

        I am using a commercial grid to display my data. I don't have any problem to display the whole table to the grid. For instance, the following code displays a whole table to the grid. grid1.SetDataBinding(table1BindingSource); Now, I only want to display the FirstName and the LastName I have the following in my form table1BindingSource and db1DataSet From db1DataSet, I can see the following by intellicense; my table names Tabl1 from intellicense I can see Table1.FirstNameColumn and Table1.LastNameColumn; My question, how can I use table1BindingSource and db1DataSet to display only the firstname and the lastname rather than the whole table?

        M Offline
        M Offline
        Muammar
        wrote on last edited by
        #3

        Try this link.


        All generalizations are wrong, including this one! (\ /) (O.o) (><)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups