ButtonColumn postback problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a button column in a datagrid. When a button is clicked on I want it to use it's value as a variable a new SQL query that will repopulate the datagrid

The problem is that the DataGrid.ItemCommand method only seems to fire if the datagrid is rebound in the page_load method. Apart from being inefficient it also causes duplicate columns in my datagrid

Can anyone tell me where I'm going wrong here

Thanks in advance, John.
 
Your post went unanswered. Have you resolved this issue? If you still need
help, please post the original question with your request.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
John McDonagh said:
I have a button column in a datagrid. When a button is clicked on I want
it to use it's value as a variable a new SQL query that will repopulate the
datagrid.
The problem is that the DataGrid.ItemCommand method only seems to fire if
the datagrid is rebound in the page_load method. Apart from being
inefficient it also causes duplicate columns in my datagrid.
 
The problem is that I have a dynamically created ButtonColumn in a DataGrid. Clicking on the ButtonColumn does not seem to raise the ItemCommand method unless I rebind the DataGrid in the Page_Load method. This is not a good solution for me as it is inefficient and causes duplicate rows (I want to rebind the datagrid in the ItemCommand method according to which Button in the ButtonColumn was clicked

I've posted this question a few times and found that lots of other people have posted the same problem. It seems very common but I've yet to see any explanation for it
 
i answered this question elsewhere please see my response.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
John McDonagh said:
The problem is that I have a dynamically created ButtonColumn in a
DataGrid. Clicking on the ButtonColumn does not seem to raise the
ItemCommand method unless I rebind the DataGrid in the Page_Load method.
This is not a good solution for me as it is inefficient and causes duplicate
rows (I want to rebind the datagrid in the ItemCommand method according to
which Button in the ButtonColumn was clicked.
I've posted this question a few times and found that lots of other people
have posted the same problem. It seems very common but I've yet to see any
explanation for it.
 
Back
Top