Getting handle on ListBox inside datagrid

S

Sosh

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top