Hi Group,
I have a datagrid with dropdown in my application.
I want to fill the data in dropdown by an ArrayList
for that I am using "e.Item.FindControl("DropdownId")"
but this function is returning NULL THUS I m getting exception
"Object Refrence not set to an Instance to Object",
Here is the code I wrote (ASP.NET 1.1)...
Hope I get some help from you,
///Cdoe Behind
private void dataGrid1_ItemDataBound(object sender, DataGridItemEventArgs e)
{
if(e.Item.ItemType == ListItemType.Footer)
{
System.Web.UI.WebControls.DropDownList drp = new DropDownList();
drp = (DropDownList)e.Item.FindControl("listAnup");
drp.DataSource=newArrayList;//This Statement throwing exception
drp.DataBind();
}
}
///aspx code
PageButtonCount="15" CssClass="dgridPaging"
Mode="NumericPages">
Shri DuttaPosted Mar 26, 2006, 7:07 AM
e.Item[0].Items.FindControl("DropdownId")
i used it like that & syntex may very ... bye & TC bug me in case any further help @ [email protected]