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. dynamicaly adding check box's gridview in asp .net

dynamicaly adding check box's gridview in asp .net

Scheduled Pinned Locked Moved ASP.NET
csharpcssasp-nethelp
10 Posts 4 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.
  • V Offline
    V Offline
    Veera anil
    wrote on last edited by
    #1

    Hi all i am new to asp.net. can any one plz help me to add check box column to grid view dynamicly.... thanks in advance

    B A 2 Replies Last reply
    0
    • V Veera anil

      Hi all i am new to asp.net. can any one plz help me to add check box column to grid view dynamicly.... thanks in advance

      B Offline
      B Offline
      Blue_Boy
      wrote on last edited by
      #2

      Create TemplateField in GridView and add checkbox control. Check this link.[^]


      I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com

      V 1 Reply Last reply
      0
      • V Veera anil

        Hi all i am new to asp.net. can any one plz help me to add check box column to grid view dynamicly.... thanks in advance

        A Offline
        A Offline
        Abhijit Jana
        wrote on last edited by
        #3

        Veera anil wrote:

        add check box column to grid view dynamicly..

        This will be done by Template Field in Grid View

        Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article

        V 1 Reply Last reply
        0
        • B Blue_Boy

          Create TemplateField in GridView and add checkbox control. Check this link.[^]


          I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com

          V Offline
          V Offline
          Veera anil
          wrote on last edited by
          #4

          thank u for replying me . sorry if i am not clear ... The scenario is i am having a fields in a data base (table) ID Name Section 1 XX A 2 YY B 3 ZZ C . . . . . . . . . . . . so in gird i have to display columns like Sno XX YY ZZ the grid columns should be Generate dynamically with check boxes as i shown above plz help me thank u

          H 1 Reply Last reply
          0
          • A Abhijit Jana

            Veera anil wrote:

            add check box column to grid view dynamicly..

            This will be done by Template Field in Grid View

            Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article

            V Offline
            V Offline
            Veera anil
            wrote on last edited by
            #5

            thank u for replying me sorry if i am not clear ... The scenario is i am having a fields in a data base (table) ID Name Section 1 XX A 2 YY B 3 ZZ C . . . . . . . . . . . . so in gird i have to display columns like Sno XX YY ZZ the grid columns should be Generate dynamically with check boxes as i shown above plz help me thank u

            A 1 Reply Last reply
            0
            • V Veera anil

              thank u for replying me . sorry if i am not clear ... The scenario is i am having a fields in a data base (table) ID Name Section 1 XX A 2 YY B 3 ZZ C . . . . . . . . . . . . so in gird i have to display columns like Sno XX YY ZZ the grid columns should be Generate dynamically with check boxes as i shown above plz help me thank u

              H Offline
              H Offline
              Hemant_ec48
              wrote on last edited by
              #6

              can you please more clarify your requirement....as you want to display XX , YY , ZZ horizontally?? what is the purpose to display like this....and after display you have to select or not....which event you have to fire???

              V 1 Reply Last reply
              0
              • H Hemant_ec48

                can you please more clarify your requirement....as you want to display XX , YY , ZZ horizontally?? what is the purpose to display like this....and after display you have to select or not....which event you have to fire???

                V Offline
                V Offline
                Veera anil
                wrote on last edited by
                #7

                Actually the "XX,YY,ZZ..." are the user name. so the user name are not fixed its dynamic it may increase or decrease .... so this names should display horizontally as a header with check box columns in the grid... the main purposes is that giving authorization to a user for a particular area... ex Sno XX YY ZZ 1 _ 2 3 if the user checks at xx at 1st position (ie '-') that he can access page "1"........ am i clear to explain u? thank u

                A H 2 Replies Last reply
                0
                • V Veera anil

                  Actually the "XX,YY,ZZ..." are the user name. so the user name are not fixed its dynamic it may increase or decrease .... so this names should display horizontally as a header with check box columns in the grid... the main purposes is that giving authorization to a user for a particular area... ex Sno XX YY ZZ 1 _ 2 3 if the user checks at xx at 1st position (ie '-') that he can access page "1"........ am i clear to explain u? thank u

                  A Offline
                  A Offline
                  Abhijit Jana
                  wrote on last edited by
                  #8

                  Here I will suggest you to use DataView or Repeater Control rather that GridView. Or use XSLT to render data on page, depends on requirments. This is for your Reference Check It Hope this will help you :-D Thanks

                  Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article

                  1 Reply Last reply
                  0
                  • V Veera anil

                    thank u for replying me sorry if i am not clear ... The scenario is i am having a fields in a data base (table) ID Name Section 1 XX A 2 YY B 3 ZZ C . . . . . . . . . . . . so in gird i have to display columns like Sno XX YY ZZ the grid columns should be Generate dynamically with check boxes as i shown above plz help me thank u

                    A Offline
                    A Offline
                    Abhijit Jana
                    wrote on last edited by
                    #9

                    Please check my reply over here

                    Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article

                    1 Reply Last reply
                    0
                    • V Veera anil

                      Actually the "XX,YY,ZZ..." are the user name. so the user name are not fixed its dynamic it may increase or decrease .... so this names should display horizontally as a header with check box columns in the grid... the main purposes is that giving authorization to a user for a particular area... ex Sno XX YY ZZ 1 _ 2 3 if the user checks at xx at 1st position (ie '-') that he can access page "1"........ am i clear to explain u? thank u

                      H Offline
                      H Offline
                      Hemant_ec48
                      wrote on last edited by
                      #10

                      Ok.... you mean to say abc.ASPX User_1 User_2 User_3 User_4 xyz.ASPX User_1 User_2 User_3 User_4 pqr.ASPX User_1 User_2 User_3 User_4 So if you select User_1, user_2 for abc.ASPX than this two user can see abc.ASPX To implement this one with help of Gridview is to much lengthy process and time taking...because after selecting you have to store this data to Database.... also While binding this grid view if user have already rights for this page at that time u have to make them check at first time of page load. Ao at time of saving you have to check whether user have already rights or not. Better solution is to use two list box First listbox contain all page name and second Listbox contain all the use name....after secting page name on selected index change event u can fatch all the records from the DB for users....and on click of submit you can easily identify this one.

                      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