D
David
Hi,
I have a VB.NET / ASP.NET program I'm trying to debug in which the columns in the DataGrid change depending on user selections. The data is sourced from a database, so the number of rows varies with the selection parameters. The columns are being added dynamically at runtime. There are 4 columns that are templated columns implementing the ITemplate interface. These columns are TextBoxes in which I want to be able to handle the TextChanged event. (No Edit / Update button on the grid, just a blank TextBox that should raise the TextChanged event when it loses focus.)
I have enabled AutoPostback, as well as ViewState. However, the TextChanged event is never fired. After researching a bit on the internet, it appears as if it won't be fired because the control doesn't exist on the Page_Load event. I've seen numerous examples of how to deal with dynamically created controls on a WebForm, and numerous questions on how to do this in a DataGrid, but no explicit answers on how to accomplish it.
Any suggestions (especially code examples!) would be greatly appreciated!
Thanks!
David
I have a VB.NET / ASP.NET program I'm trying to debug in which the columns in the DataGrid change depending on user selections. The data is sourced from a database, so the number of rows varies with the selection parameters. The columns are being added dynamically at runtime. There are 4 columns that are templated columns implementing the ITemplate interface. These columns are TextBoxes in which I want to be able to handle the TextChanged event. (No Edit / Update button on the grid, just a blank TextBox that should raise the TextChanged event when it loses focus.)
I have enabled AutoPostback, as well as ViewState. However, the TextChanged event is never fired. After researching a bit on the internet, it appears as if it won't be fired because the control doesn't exist on the Page_Load event. I've seen numerous examples of how to deal with dynamically created controls on a WebForm, and numerous questions on how to do this in a DataGrid, but no explicit answers on how to accomplish it.
Any suggestions (especially code examples!) would be greatly appreciated!
Thanks!
David