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. Web Development
  3. ASP.NET
  4. DataGrid

DataGrid

Scheduled Pinned Locked Moved ASP.NET
8 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.
  • K Offline
    K Offline
    Khan Bangash
    wrote on last edited by
    #1

    Hello I have to different tables. I want to Display both tables data on one datagrid. Is that possible. If yes then plz tell me how. Thankx in Advance.

    S N 3 Replies Last reply
    0
    • K Khan Bangash

      Hello I have to different tables. I want to Display both tables data on one datagrid. Is that possible. If yes then plz tell me how. Thankx in Advance.

      S Offline
      S Offline
      Sylvester george
      wrote on last edited by
      #2

      Hope this will help you http://www.dotnetbips.com/articles/displayarticledetails.aspx?articleid=94[^]

      Regards, Sylvester G Senior Software Engineer Xoriant Solutions sylvester_g_m@yahoo.com

      K 1 Reply Last reply
      0
      • S Sylvester george

        Hope this will help you http://www.dotnetbips.com/articles/displayarticledetails.aspx?articleid=94[^]

        Regards, Sylvester G Senior Software Engineer Xoriant Solutions sylvester_g_m@yahoo.com

        K Offline
        K Offline
        Khan Bangash
        wrote on last edited by
        #3

        Thank u very much but sir i have two different tables. One Table may have less rows then the other. However One table primary key is included in the other. Tables Structur Cust_Order(Order_Id, cust_id, Date...) Cust_Debit(Debit_No, Order_Id, ......) Is that possible to Display boths Data on Same Datagrid. Cust_Debit may have 0 or less records then Cust_Order. Please Help Thanks in Advance.

        S 1 Reply Last reply
        0
        • K Khan Bangash

          Thank u very much but sir i have two different tables. One Table may have less rows then the other. However One table primary key is included in the other. Tables Structur Cust_Order(Order_Id, cust_id, Date...) Cust_Debit(Debit_No, Order_Id, ......) Is that possible to Display boths Data on Same Datagrid. Cust_Debit may have 0 or less records then Cust_Order. Please Help Thanks in Advance.

          S Offline
          S Offline
          Sylvester george
          wrote on last edited by
          #4

          In the select query itself you can use joins, If you dont want to miss records from Cust_Order then use the following join Select From Cust_Order Left Outer Join Cust_Debit On Cust_Order.Order_Id=Cust_Debit.Order_Id If you dont want to miss records from Cust_Debit then use the following join Select From Cust_Order Right Outer Join Cust_Debit On Cust_Order.Order_Id=Cust_Debit.Order_Id If you dont want to miss records from both Cust_Order and Cust_Debit then use the following join Select From Cust_Order Full Outer Join Cust_Debit On Cust_Order.Order_Id=Cust_Debit.Order_Id Regards, Sylvester G Senior Software Engineer Xoriant Solutions sylvester_g_m@yahoo.com

          1 Reply Last reply
          0
          • K Khan Bangash

            Hello I have to different tables. I want to Display both tables data on one datagrid. Is that possible. If yes then plz tell me how. Thankx in Advance.

            N Offline
            N Offline
            Neeraj Arora
            wrote on last edited by
            #5

            You can use hierarchical grid. show debt part in child row.

            K 1 Reply Last reply
            0
            • N Neeraj Arora

              You can use hierarchical grid. show debt part in child row.

              K Offline
              K Offline
              Khan Bangash
              wrote on last edited by
              #6

              I used the following query but it display records twice.Means repeating. It should not be. SELECT cust_order.order_id, cust_order.order_date, cust_order.order_status, cust_order.lock_status, Cust_debit.Debit_Id FROM cust_order, Cust_debit WHERE Cust_debit.Cust_Id = " & cust_id & " and cust_order.customer_id = " & cust_id whre cust_id is customer_id. Please help

              N 1 Reply Last reply
              0
              • K Khan Bangash

                I used the following query but it display records twice.Means repeating. It should not be. SELECT cust_order.order_id, cust_order.order_date, cust_order.order_status, cust_order.lock_status, Cust_debit.Debit_Id FROM cust_order, Cust_debit WHERE Cust_debit.Cust_Id = " & cust_id & " and cust_order.customer_id = " & cust_id whre cust_id is customer_id. Please help

                N Offline
                N Offline
                Neeraj Arora
                wrote on last edited by
                #7

                create a join between cust_order.order_id = cust_debit.Cust_id

                1 Reply Last reply
                0
                • K Khan Bangash

                  Hello I have to different tables. I want to Display both tables data on one datagrid. Is that possible. If yes then plz tell me how. Thankx in Advance.

                  S Offline
                  S Offline
                  Sylvester george
                  wrote on last edited by
                  #8

                  use like this Select From Cust_Order Inner Join Cust_Debit On Cust_Order.Order_Id=Cust_Debit.Order_Id where Cust_Order.Order_Id = Regards, Sylvester G Senior Software Engineer Xoriant Solutions sylvester_g_m@yahoo.com

                  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