Bound DataGrid.Columns.Count = 0

Discussion in 'ASP .Net' started by Dan, Mar 2, 2004.

  1. Dan

    Dan Guest

    I have successfully bound a DataGrid on Web Form (i.e. it shows the data
    properly in the browser). It looks like there are 4 columns of data, but
    when I retrieve DataGrid.Columns.Count in the Page_Load event (after
    binding), it returns 0. Why?
     
    Dan, Mar 2, 2004
    #1
    1. Advertising

  2. Your post went unanswered. Have you resolved this issue?

    --
    Regards,
    Alvin Bruney [ASP.NET MVP]
    Got tidbits? Get it here...
    http://tinyurl.com/3he3b
    "Dan" <> wrote in message
    news:...
    > I have successfully bound a DataGrid on Web Form (i.e. it shows the data
    > properly in the browser). It looks like there are 4 columns of data, but
    > when I retrieve DataGrid.Columns.Count in the Page_Load event (after
    > binding), it returns 0. Why?
    >
    >
     
    Alvin Bruney [MVP], Mar 4, 2004
    #2
    1. Advertising

  3. Dan

    Dan Guest

    Yes. Apparently, this occurs when you have AutoGenerateColumns=TRUE. It
    kind of seems like a bug.

    Dan

    "Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
    news:%...
    > Your post went unanswered. Have you resolved this issue?
    >
    > --
    > Regards,
    > Alvin Bruney [ASP.NET MVP]
    > Got tidbits? Get it here...
    > http://tinyurl.com/3he3b
    > "Dan" <> wrote in message
    > news:...
    > > I have successfully bound a DataGrid on Web Form (i.e. it shows the data
    > > properly in the browser). It looks like there are 4 columns of data,

    but
    > > when I retrieve DataGrid.Columns.Count in the Page_Load event (after
    > > binding), it returns 0. Why?
    > >
    > >

    >
    >
     
    Dan, Mar 4, 2004
    #3
    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. Julie Barnet

    Datagrid bound columns

    Julie Barnet, Dec 2, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    426
    Julie Barnet
    Dec 2, 2003
  2. =?Utf-8?B?RGF2aWQ=?=

    Help a newbie... (DataGrid bound & template columns)

    =?Utf-8?B?RGF2aWQ=?=, Feb 7, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    430
    Vadivel Kumar
    Feb 10, 2005
  3. =?Utf-8?B?Sm9u?=

    Datagrid, adding bound columns.

    =?Utf-8?B?Sm9u?=, Feb 15, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    428
    =?Utf-8?B?Sm9u?=
    Feb 15, 2006
  4. Replies:
    1
    Views:
    490
    =?Utf-8?B?U2VyZ2V5IFp1eWV2?=
    Sep 21, 2006
  5. Vinki

    template columns and bound columns in gridview

    Vinki, Apr 25, 2007, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    885
    Vinki
    Apr 25, 2007
Loading...

Share This Page