Even on load was not early enough to participate in viewstate. I have tried
confused. Apparently the columns and row modifications I am making to the
some garbled results. The framework dows not seem to save the viewstate of
was built. The trick is not to use the built in viewstate and manage it
yourself. What I ended up doing is saving the DataSet result in the view
result is still only one DB hit. Only one problem remains. The fields that
shows a validation error. I need to somehow get the Forms values and
populate my controls with them as in the old ASP days. Any suggestions?
"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
news:%23CMdPB3jEHA.3632@TK2MSFTNGP09.phx.gbl...
> you will need to bind on every request, or you can try putting the bind
> code early in the pipeline so that it can participate in viewstate. you
> will have to look at the pipeline events to find a suitable one (prerender
> comes to mind but i'm not sure that it is early enough to participate in
> viewstate)
>
> --
> Regards,
> Alvin Bruney
> [ASP.NET MVP
http://mvp.support.microsoft.com/default.aspx]
> Got tidbits? Get it here...
http://tinyurl.com/27cok > "Perecli Manole" <Perry@argowin.com> wrote in message
> news:OF7oY9ujEHA.592@TK2MSFTNGP11.phx.gbl...
>> You missunderstand my requirement. The reason I need to add a row
>> dynamicaly to the grid is because my row table strucuture needs to be
>> changed. For every row in the database I need two rows in the grid. First
>> row for each record should have one column structure and shows half the
>> data while the second row has a different column structure and shows the
>> other half of the data. In edit mode I need to go back to a "signle
>> row/single column" because I show an entry form in it. I have achieved
>> this by altering the grid's structure in the DataBind event however I
>> have the problem described in my previous post.
>>
>> Perry
>>
>>
>> "Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
>> news:u2y3qpTjEHA.3876@TK2MSFTNGP15.phx.gbl...
>>> what you need to do is add the rows to the dataset instead. whenever you
>>> bind, the extra rows are always there and you don't need to go thru the
>>> hocus pocus of postback and viewstate hell
>>>
>>> --
>>> Regards,
>>> Alvin Bruney
>>> [ASP.NET MVP
http://mvp.support.microsoft.com/default.aspx]
>>> Got tidbits? Get it here...
http://tinyurl.com/27cok >>> "Perecli Manole" <Perry@argowin.com> wrote in message
>>> news:Ooyo88%23iEHA.2140@TK2MSFTNGP15.phx.gbl...
>>>> 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
>>>>
>>>
>>>
>>
>>
>
>