P
Perecli Manole
In my DataGrid I need to have two rows of data for every bound record. I
have successfully achieved this by adding datagrid items and cells through
code in the "DataGrid.ItemDataBound" event. The problem is that on post back
my added rows do not stay. Aparently one needs to recreate them each page
request. I have read several articles that suggest building up your grid
layout in the "DataGrid.ItemCreated" event which gets called every request.
So I put my row adding code there but then I realized that this event gets
called before the framework adds its default row in the grid which creates a
problem. I need my row to be added after the framework adds the default row
so that it can be placed below it. I can not place a row with an index after
a row that has not been created by the framework. So for now it seems like
the only solution is to bind the grid on every request which is a waste. Is
there another solution.
Perry
have successfully achieved this by adding datagrid items and cells through
code in the "DataGrid.ItemDataBound" event. The problem is that on post back
my added rows do not stay. Aparently one needs to recreate them each page
request. I have read several articles that suggest building up your grid
layout in the "DataGrid.ItemCreated" event which gets called every request.
So I put my row adding code there but then I realized that this event gets
called before the framework adds its default row in the grid which creates a
problem. I need my row to be added after the framework adds the default row
so that it can be placed below it. I can not place a row with an index after
a row that has not been created by the framework. So for now it seems like
the only solution is to bind the grid on every request which is a waste. Is
there another solution.
Perry