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. Create a telephone directory

Create a telephone directory

Scheduled Pinned Locked Moved C#
helptutorial
9 Posts 5 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.
  • S Offline
    S Offline
    sgeorgije
    wrote on last edited by
    #1

    I want to represent telephone directory in this way. Certainly, anybody may have more phones and each of them must be visible. It is all dispose in more columns, that economically use working surface. Table: TelDirectory (ID,Name,Tel) PK(ID) - primary key How to show data like this: Name1.....Name4 ------.....------ Tel11......Tel41 Tel12 Name2 ------ Tel21 Tel22 Tel23 Name3 ------ Tel31 ... Thanks for any help.

    C M M S 4 Replies Last reply
    0
    • S sgeorgije

      I want to represent telephone directory in this way. Certainly, anybody may have more phones and each of them must be visible. It is all dispose in more columns, that economically use working surface. Table: TelDirectory (ID,Name,Tel) PK(ID) - primary key How to show data like this: Name1.....Name4 ------.....------ Tel11......Tel41 Tel12 Name2 ------ Tel21 Tel22 Tel23 Name3 ------ Tel31 ... Thanks for any help.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      where are you showing it ? If in a web app, a repeater is your best option.

      Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      S 1 Reply Last reply
      0
      • C Christian Graus

        where are you showing it ? If in a web app, a repeater is your best option.

        Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        S Offline
        S Offline
        sgeorgije
        wrote on last edited by
        #3

        It's a win app.

        C 1 Reply Last reply
        0
        • S sgeorgije

          I want to represent telephone directory in this way. Certainly, anybody may have more phones and each of them must be visible. It is all dispose in more columns, that economically use working surface. Table: TelDirectory (ID,Name,Tel) PK(ID) - primary key How to show data like this: Name1.....Name4 ------.....------ Tel11......Tel41 Tel12 Name2 ------ Tel21 Tel22 Tel23 Name3 ------ Tel31 ... Thanks for any help.

          M Offline
          M Offline
          Manoj Kumar Rai
          wrote on last edited by
          #4

          First of all, the ID cannot be a Primary Key as it will not be unique, since anybody can have more than 1 phones. You can get the list sorted on ID/name of the customer. Once it is sorted it will be esily printed.

          Manoj Never Gives up

          C 1 Reply Last reply
          0
          • S sgeorgije

            It's a win app.

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            Then it's up to you to render the results any way you like. No built in control will give the layout you're wanting, however.

            Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

            1 Reply Last reply
            0
            • S sgeorgije

              I want to represent telephone directory in this way. Certainly, anybody may have more phones and each of them must be visible. It is all dispose in more columns, that economically use working surface. Table: TelDirectory (ID,Name,Tel) PK(ID) - primary key How to show data like this: Name1.....Name4 ------.....------ Tel11......Tel41 Tel12 Name2 ------ Tel21 Tel22 Tel23 Name3 ------ Tel31 ... Thanks for any help.

              M Offline
              M Offline
              Malcolm Smart
              wrote on last edited by
              #6

              You posted this exact same question a few days ago. What have you tried since then? Even writing some long, slow, even poor code, to get the job done will give you a starting point. Then post snippets of that code, and the people here will help optimise it.

              "More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF

              1 Reply Last reply
              0
              • M Manoj Kumar Rai

                First of all, the ID cannot be a Primary Key as it will not be unique, since anybody can have more than 1 phones. You can get the list sorted on ID/name of the customer. Once it is sorted it will be esily printed.

                Manoj Never Gives up

                C Offline
                C Offline
                Colin Angus Mackay
                wrote on last edited by
                #7

                Manoj Kumar Rai wrote:

                First of all, the ID cannot be a Primary Key as it will not be unique, since anybody can have more than 1 phones.

                How does that make ID not unique 1 Colin Mackay 0123 456 7890 2 Colin Mackay 0321 654 0987 Looks fine to me - What did you think was wrong with it?


                Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... "I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless." My website

                M 1 Reply Last reply
                0
                • C Colin Angus Mackay

                  Manoj Kumar Rai wrote:

                  First of all, the ID cannot be a Primary Key as it will not be unique, since anybody can have more than 1 phones.

                  How does that make ID not unique 1 Colin Mackay 0123 456 7890 2 Colin Mackay 0321 654 0987 Looks fine to me - What did you think was wrong with it?


                  Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... "I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless." My website

                  M Offline
                  M Offline
                  Manoj Kumar Rai
                  wrote on last edited by
                  #8

                  Ahhh, Ok. Its record ID and not the ID of the person where I thought wrongly. But in either case for the problem we had to print this Unique key do not have any role to play. We have to sort the list on the basis of the Name and get the values printed.

                  Manoj Never Gives up

                  1 Reply Last reply
                  0
                  • S sgeorgije

                    I want to represent telephone directory in this way. Certainly, anybody may have more phones and each of them must be visible. It is all dispose in more columns, that economically use working surface. Table: TelDirectory (ID,Name,Tel) PK(ID) - primary key How to show data like this: Name1.....Name4 ------.....------ Tel11......Tel41 Tel12 Name2 ------ Tel21 Tel22 Tel23 Name3 ------ Tel31 ... Thanks for any help.

                    S Offline
                    S Offline
                    sgeorgije
                    wrote on last edited by
                    #9

                    It isn't difficult as a table, but I dont know how to displey data on win form in this way. If I get names and phones into dataset, how show them? How can I provide repetition structure unequal form, that contain name and suitable phones, where all phones are visible? It seems datagridview isn't proper control to realize that. How else can I do it?

                    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