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. to display checkboxes on the right side using template field

to display checkboxes on the right side using template field

Scheduled Pinned Locked Moved ASP.NET
12 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.
  • S scar_face

    is it possible to display the checkboxes on the right side of a gridview when we use template field..

    scarface

    K Offline
    K Offline
    Kunal Pawar
    wrote on last edited by
    #2

    Yes, you can just go in gridview property and change order of columns.

    S 1 Reply Last reply
    0
    • K Kunal Pawar

      Yes, you can just go in gridview property and change order of columns.

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

      i did check the properties of gridview but where is the ordering of the columns..

      scarface

      S 1 Reply Last reply
      0
      • S scar_face

        i did check the properties of gridview but where is the ordering of the columns..

        scarface

        S Offline
        S Offline
        Satish Mahapatra
        wrote on last edited by
        #4

        Go to .aspx page.In the gridview inside columns the column names alongwith it's properties are there.You just move that checkbox row to the last order.

        S 1 Reply Last reply
        0
        • S Satish Mahapatra

          Go to .aspx page.In the gridview inside columns the column names alongwith it's properties are there.You just move that checkbox row to the last order.

          S Offline
          S Offline
          scar_face
          wrote on last edited by
          #5

          well i did try dragging the checkbox column but thats not working..and i checked in the properties but there is no option for that..

          scarface

          S 1 Reply Last reply
          0
          • S scar_face

            well i did try dragging the checkbox column but thats not working..and i checked in the properties but there is no option for that..

            scarface

            S Offline
            S Offline
            Satish Mahapatra
            wrote on last edited by
            #6

            what man u have to just move the checkbox column to the last order in aspx code. say: Like that order only u have to keep.

            S 1 Reply Last reply
            0
            • S Satish Mahapatra

              what man u have to just move the checkbox column to the last order in aspx code. say: Like that order only u have to keep.

              S Offline
              S Offline
              scar_face
              wrote on last edited by
              #7

              hey that message wasnt getting displayed..i tried in code..but there is no property as ordering of columns..am not getting as to where are you referring to change.. hey thanks for your help..

              scarface

              S 1 Reply Last reply
              0
              • S scar_face

                hey that message wasnt getting displayed..i tried in code..but there is no property as ordering of columns..am not getting as to where are you referring to change.. hey thanks for your help..

                scarface

                S Offline
                S Offline
                Satish Mahapatra
                wrote on last edited by
                #8

                <Columns> <asp:BoundField DataField="Country_ID" HeaderText="Country_ID" InsertVisible="False" ReadOnly="True" SortExpression="Country_ID" /> <asp:BoundField DataField="Country_Name" HeaderText="Country_Name" SortExpression="Country_Name" /> <asp:BoundField DataField="Continent_ID" HeaderText="Continent_ID" SortExpression="Continent_ID" /> <asp:BoundField DataField="Continent_Name" HeaderText="Continent_Name" SortExpression="Continent_Name" /> asp:TemplateField <ItemTemplate> <asp:CheckBox ID ="df" runat ="server" /> </ItemTemplate> </asp:TemplateField> </Columns> just replace < and > with< and > resp and try.

                S 1 Reply Last reply
                0
                • S Satish Mahapatra

                  <Columns> <asp:BoundField DataField="Country_ID" HeaderText="Country_ID" InsertVisible="False" ReadOnly="True" SortExpression="Country_ID" /> <asp:BoundField DataField="Country_Name" HeaderText="Country_Name" SortExpression="Country_Name" /> <asp:BoundField DataField="Continent_ID" HeaderText="Continent_ID" SortExpression="Continent_ID" /> <asp:BoundField DataField="Continent_Name" HeaderText="Continent_Name" SortExpression="Continent_Name" /> asp:TemplateField <ItemTemplate> <asp:CheckBox ID ="df" runat ="server" /> </ItemTemplate> </asp:TemplateField> </Columns> just replace < and > with< and > resp and try.

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

                  i dint get this line < and > with < and > resp and try... and am not using bound field..am having a gridview in which am using template field which has checkbox and am filling the data inside it with a datatable which is binded with the gridview..

                  scarface

                  S 1 Reply Last reply
                  0
                  • S scar_face

                    i dint get this line < and > with < and > resp and try... and am not using bound field..am having a gridview in which am using template field which has checkbox and am filling the data inside it with a datatable which is binded with the gridview..

                    scarface

                    S Offline
                    S Offline
                    Satish Mahapatra
                    wrote on last edited by
                    #10

                    can i see the code

                    S 1 Reply Last reply
                    0
                    • S Satish Mahapatra

                      can i see the code

                      S Offline
                      S Offline
                      scar_face
                      wrote on last edited by
                      #11

                      here's my code..

                      <asp:GridView ID="GridView1" runat="server">
                      <Columns>
                      <asp:TemplateField headertext="select">
                      <ItemTemplate>
                      <asp:CheckBox ID="chkbx" runat="server" /></ItemTemplate></asp:TemplateField></Columns>
                      </asp:GridView>

                      scarface

                      S 1 Reply Last reply
                      0
                      • S scar_face

                        here's my code..

                        <asp:GridView ID="GridView1" runat="server">
                        <Columns>
                        <asp:TemplateField headertext="select">
                        <ItemTemplate>
                        <asp:CheckBox ID="chkbx" runat="server" /></ItemTemplate></asp:TemplateField></Columns>
                        </asp:GridView>

                        scarface

                        S Offline
                        S Offline
                        Satish Mahapatra
                        wrote on last edited by
                        #12

                        make the autogeneratecolumns="false" and add whatever columns u need in the columns section as boundfield or temp field watever u like.

                        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