Getting handle on ListBox inside datagrid

Discussion in 'ASP .Net' started by Sosh, Jun 12, 2005.

  1. Sosh

    Sosh Guest

    Hi,

    I'm having a bit of a job getting a handle on a ListBox that i've
    placed in one column of the footer in a DataGrid.

    Here's what I've tried so far:

    - Declaring a protected listbox (with the same id as the aspx) in code
    behind, and accessing that directly.

    - using (ListBox)FindControl("IDoflistbox")

    - using (ListBox)IDofdatagrid.FindControl("IDoflistbox")

    However, in each case I get an 'Object reference not set to an
    instance of an object' error when I try and do anything with the
    control.

    Could anyone tell me what might be wrong here?

    Thanks
    Sosh, Jun 12, 2005
    #1
    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. Dietrich
    Replies:
    1
    Views:
    628
    Joe Smith
    Jul 22, 2004
  2. blenderdude
    Replies:
    0
    Views:
    823
    blenderdude
    Aug 3, 2003
  3. =?Utf-8?B?UmFqYQ==?=

    Listbox inside a DataGrid

    =?Utf-8?B?UmFqYQ==?=, Feb 15, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    5,520
    Scott Allen
    Feb 16, 2005
  4. Leon
    Replies:
    2
    Views:
    511
  5. =?ISO-8859-1?Q?KLEIN_St=E9phane?=
    Replies:
    3
    Views:
    441
    hanumizzle
    Oct 6, 2006
Loading...

Share This Page