Gridview inside datalist row_data_bound

I have a datalist that contains a gridview inside its itemtemplate. on item-data_bound from datalist i assign specific datasource to datagrid of that item, then i add eventhanlder for row_data_bound of grid. Then I snap the mesh. Attach it to the grid: gv.RowDataBound + = new GridViewRowEventHandler (gv_RowDataBound); and declare and implement an event handler. The problem is that the row_data_bound of the grid is not firing. Can anyone please help?

+2


a source to share


1 answer


Have you tried calling DataBind on a datalist quite early in the page lifecycle? The reason I am asking is because the DataBinding event usually occurs immediately after the page's PreRender event. When you post back, chances are that the dynamically created EventHandler is being created too late.



With no code to look at, it's hard to experiment to determine if this helps, but it's worth a try.

0


a source







All Articles