GridView Control is not posting back correctly

M

Muhammad Usman

Hi All

I am using ASP 2 in VS 2005.net beta 2. I am using a gridview and have
bounded it with datatable. I have added dropdownlist to the gridview
cell dynamically.

DropDownList DropListJoins = new DropDownList();
DropListJoins.AutoPostBack=true;
DropListJoins.SelectedIndexChanged += new
EventHandler(DropListJoins_SelectedIndexChanged);
gvQueryPane.Rows[0].Cells[4].Controls.Add(DropListJoins);


void DropListJoins_TextChanged(object sender, EventArgs e)
{
}

//gvQueryPane is the gridview object


Now on index changed postback the callback function of indexchanged isnt
called but the pageload event is called and on refresh it erases the
dropdownlist control from the cell.

How do i overcome this problem.

regards
Muhammad Usman
 

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

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top