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. Gridview

Gridview

Scheduled Pinned Locked Moved ASP.NET
comhelp
7 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.
  • A Offline
    A Offline
    Anjani Poornima
    wrote on last edited by
    #1

    hiii, I like to generate the report using gridview. In that report i am having EmpName,DependentName,RelationType,Email_id what the matter is the gridview have to be in the style EmpName DependentName RelationType Email_id --------------------------------------------------------- John kamal father abc@dfg.com ----------------------------------------------------------- Ashok Friend adg@sdf.com ----------------------------------------------------------- Amit Friend adg@sdf.com ------------------------------------------------------------ In this way i have to get all the dependent names of the employees. How i can make the style of gridview as above. plz anyone help me in doin this... Thanks in advance

    P 1 Reply Last reply
    0
    • A Anjani Poornima

      hiii, I like to generate the report using gridview. In that report i am having EmpName,DependentName,RelationType,Email_id what the matter is the gridview have to be in the style EmpName DependentName RelationType Email_id --------------------------------------------------------- John kamal father abc@dfg.com ----------------------------------------------------------- Ashok Friend adg@sdf.com ----------------------------------------------------------- Amit Friend adg@sdf.com ------------------------------------------------------------ In this way i have to get all the dependent names of the employees. How i can make the style of gridview as above. plz anyone help me in doin this... Thanks in advance

      P Offline
      P Offline
      padmanabhan N
      wrote on last edited by
      #2

      hi, there are lots of grid styles available in Auto Format. Check which style suits for you.

      Padmanabhan

      B A 2 Replies Last reply
      0
      • P padmanabhan N

        hi, there are lots of grid styles available in Auto Format. Check which style suits for you.

        Padmanabhan

        B Offline
        B Offline
        Baran M
        wrote on last edited by
        #3

        If you have a problem with griview design, Check this[^]

        1 Reply Last reply
        0
        • P padmanabhan N

          hi, there are lots of grid styles available in Auto Format. Check which style suits for you.

          Padmanabhan

          A Offline
          A Offline
          Anjani Poornima
          wrote on last edited by
          #4

          hii, Not like that... I want gridview in the format that john is the emp_name. I want to get emp_name only in the first row of the gridview... In the second row i should not get the empname have to move directly to the dependent_name. i.e in the second & third row the emp_name cell must be empty.. How i can get this.. plz help me its very urgent Thanks in advance

          P 2 Replies Last reply
          0
          • A Anjani Poornima

            hii, Not like that... I want gridview in the format that john is the emp_name. I want to get emp_name only in the first row of the gridview... In the second row i should not get the empname have to move directly to the dependent_name. i.e in the second & third row the emp_name cell must be empty.. How i can get this.. plz help me its very urgent Thanks in advance

            P Offline
            P Offline
            padmanabhan N
            wrote on last edited by
            #5

            //you can achieve like this GridView1.Rows[i].Cells[i].RowSpan = 4; GridView1.Rows[i].Cells[i].ColumnSpan = 4; (or) refer : Merge DataGrid Header[^] refer : Merge Header - Gridview/DataGrid[^] refer : How to merge cells with equal values in a GridView[^]

            Padmanabhan

            1 Reply Last reply
            0
            • A Anjani Poornima

              hii, Not like that... I want gridview in the format that john is the emp_name. I want to get emp_name only in the first row of the gridview... In the second row i should not get the empname have to move directly to the dependent_name. i.e in the second & third row the emp_name cell must be empty.. How i can get this.. plz help me its very urgent Thanks in advance

              P Offline
              P Offline
              padmanabhan N
              wrote on last edited by
              #6

              and also refer : Cell Merging of DataGrid in ASP.NET[^]

              Padmanabhan

              B 1 Reply Last reply
              0
              • P padmanabhan N

                and also refer : Cell Merging of DataGrid in ASP.NET[^]

                Padmanabhan

                B Offline
                B Offline
                Baran M
                wrote on last edited by
                #7

                If you know how many cells to be merged then you could use this. But if you dont know how many cells to be merged, for example for an employee, no. of dependents will be differing. So Declare a class global variable and in GridView1_RowDataBound event, try this if (str != e.Row.Cells[2].Text) { str = e.Row.Cells[2].Text; } else { e.Row.Cells[2].Text = ""; } :)

                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