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 ItemTemplate different location?

GridView ItemTemplate different location?

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelpquestion
5 Posts 2 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.
  • J Offline
    J Offline
    Jens Meyer
    wrote on last edited by
    #1

    Hello, I'm using ASP.NET 2.0. I have to make a Gridview containing a couple of buttons. I inserted the buttons using ItemTemplates. When the GridView is rendered to the client the ItemTemplates containing the buttons are allways placed to the left hand of the gridview and the data is placed right of the buttons. Is it possible to put the ItemTemplates/Buttons to the right hand side of the GridView and the data to the left hand side? Thanks for any help on this. Best tregards Jens

    C 1 Reply Last reply
    0
    • J Jens Meyer

      Hello, I'm using ASP.NET 2.0. I have to make a Gridview containing a couple of buttons. I inserted the buttons using ItemTemplates. When the GridView is rendered to the client the ItemTemplates containing the buttons are allways placed to the left hand of the gridview and the data is placed right of the buttons. Is it possible to put the ItemTemplates/Buttons to the right hand side of the GridView and the data to the left hand side? Thanks for any help on this. Best tregards Jens

      C Offline
      C Offline
      Chetan Ranpariya
      wrote on last edited by
      #2

      hi, Set AutoGenerateColumns = "False" for you gridview and create boundcolumns for all the data to display and at the last create your tempaltecolumns to display the buttons.

      Thanks and Regards, Chetan Ranpariya

      J 1 Reply Last reply
      0
      • C Chetan Ranpariya

        hi, Set AutoGenerateColumns = "False" for you gridview and create boundcolumns for all the data to display and at the last create your tempaltecolumns to display the buttons.

        Thanks and Regards, Chetan Ranpariya

        J Offline
        J Offline
        Jens Meyer
        wrote on last edited by
        #3

        Hi Chetan, thanks for your answer. So when i get this right, you suggest to generate the template columns dynamically? When do i have to do this (After databinding for instance) and do i do it? Best regards Jens

        C 1 Reply Last reply
        0
        • J Jens Meyer

          Hi Chetan, thanks for your answer. So when i get this right, you suggest to generate the template columns dynamically? When do i have to do this (After databinding for instance) and do i do it? Best regards Jens

          C Offline
          C Offline
          Chetan Ranpariya
          wrote on last edited by
          #4

          Hi U dont need to create template columns dynamically. I hope this will help u. Thanks and Regards, Chetan Ranpariya

          J 1 Reply Last reply
          0
          • C Chetan Ranpariya

            Hi U dont need to create template columns dynamically. I hope this will help u. Thanks and Regards, Chetan Ranpariya

            J Offline
            J Offline
            Jens Meyer
            wrote on last edited by
            #5

            Dear Chetan, thank you very much for your kind help. That was exactly what i needed. Man, you made my day :) Thanks again Jens

            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