Gridview AutoGenerateColumns=True

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • giveDsolution
    New Member
    • May 2007
    • 107

    Gridview AutoGenerateColumns=True

    Hope to find the Solution,
    My requirment is, I have set AutoGenerateCol umns=True for a gridview as i have to add columns at runtime.

    My first question is: How to hide a column ?

    And my second question is: Can i add the columns at runtime without doing AutoGenerateCol umns=True.

    Plz Suggest me anykind of alternatives.
    Thnks in advance
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    1. Hide it in the html
    2. Do you mean data binding?

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #3
      AutoGenerateCol umns=True for a gridview as i have to add columns at runtime.
      It was my understanding that if you are manually adding the columns yourself and not using a databind, you would want that property set to false.

      Comment

      • giveDsolution
        New Member
        • May 2007
        • 107

        #4
        Gridview Rowcreated

        Can we create a control on rowcreate event of Gridview.
        Help me techies.....

        Comment

        • giveDsolution
          New Member
          • May 2007
          • 107

          #5
          no response???? PLz help me guys

          Comment

          • giveDsolution
            New Member
            • May 2007
            • 107

            #6
            Originally posted by giveDsolution
            no response???? PLz help me guys
            Now i m ellaborating the Prob....

            My problem is, I am binding a Gridview having autogeneratecol umns = True through store procedure.(Colu mns are not static)

            And at the same time i m also creating radiobuttonlist in the gridview having the items which was dynamically filled from database.
            Now the actual prob is, after selecting one choice from the radiobuttonlist when i click submit button (which will be stored in the Database) , radiobuttonlist vanishes.

            can anyone suggest me the solution

            Comment

            • giveDsolution
              New Member
              • May 2007
              • 107

              #7
              Till now no response......i need the solution

              Comment

              • giveDsolution
                New Member
                • May 2007
                • 107

                #8
                Convert Bound column to Template Column

                How to convert bound column of gridview(Autoge neratecolumns=t rue) to Template comlumn at runtime

                Comment

                • giveDsolution
                  New Member
                  • May 2007
                  • 107

                  #9
                  Till now i m not able to get my solution. Plz help me as i required it very urgently

                  Comment

                  • Plater
                    Recognized Expert Expert
                    • Apr 2007
                    • 7872

                    #10
                    If you do a re-bind of the datasource, your manually created columns (aka the radiobuttons) will be wiped out, you would need to re-add them.

                    Comment

                    • giveDsolution
                      New Member
                      • May 2007
                      • 107

                      #11
                      Originally posted by Plater
                      If you do a re-bind of the datasource, your manually created columns (aka the radiobuttons) will be wiped out, you would need to re-add them.

                      Since i have not able to get the solution, i have change the logic that is i have created the template column at runtime without making autogeneratecol umns= true.

                      But now the problem is, if i click the submit button, which will enter the value in the database, the radiobuttonlist removed automatically.

                      Comment

                      • Plater
                        Recognized Expert Expert
                        • Apr 2007
                        • 7872

                        #12
                        Again, any time to you bind to a datasource, your data(and columns too I believe) is wiped out. So you would have to add them AFTER you bind your data.

                        Comment

                        Working...