hiding columns in datagrid not working

Discussion in 'ASP .Net' started by =?Utf-8?B?a2x5bm4=?=, Oct 8, 2004.

  1. I queried a series of fields from a database and passed into a datatable.
    Then bound this to a datagrid. I need to hide 2 of the colums. This doesnt
    seem to be working the standard way. (with datagrid columns hide). When I
    query for number of columns in datagrid I always get 0 no matter what, even
    after showing all the columns. I must dynamically build the table after page
    post (I pass in parameters to define the table I'll be querying) so I dont
    know the columns up front. Any ideas?
    =?Utf-8?B?a2x5bm4=?=, Oct 8, 2004
    #1
    1. Advertising

  2. got it.
    didnt have the autogeneratecolumns property set right
    good article describes the solution:
    http://www.c-sharpcorner.com/Code/2003/June/HideDataGridColDyna.asp

    "klynn" wrote:

    > I queried a series of fields from a database and passed into a datatable.
    > Then bound this to a datagrid. I need to hide 2 of the colums. This doesnt
    > seem to be working the standard way. (with datagrid columns hide). When I
    > query for number of columns in datagrid I always get 0 no matter what, even
    > after showing all the columns. I must dynamically build the table after page
    > post (I pass in parameters to define the table I'll be querying) so I dont
    > know the columns up front. Any ideas?
    =?Utf-8?B?a2x5bm4=?=, Oct 8, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Amber
    Replies:
    1
    Views:
    618
    Alvin Bruney
    Oct 11, 2003
  2. tshad
    Replies:
    9
    Views:
    3,316
    tshad
    Apr 5, 2005
  3. rob thomson
    Replies:
    0
    Views:
    253
    rob thomson
    Sep 4, 2003
  4. Amber

    Hiding and Showing Columns in the DataGrid Control...

    Amber, Oct 7, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    161
    Alvin Bruney
    Oct 11, 2003
  5. ton
    Replies:
    2
    Views:
    200
    Alvin Bruney [MVP]
    Feb 11, 2004
Loading...

Share This Page