Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Controls (http://www.velocityreviews.com/forums/f63-asp-net-web-controls.html)
-   -   createchildcontrols fires before click event (http://www.velocityreviews.com/forums/t779990-createchildcontrols-fires-before-click-event.html)

hsnkamal@yahoo.com 06-26-2007 03:10 AM

createchildcontrols fires before click event
 
i have developed a web part using class library.when i clicked a
button it displayed a datagrid.after that i want to edit it.when i
click a edit button it goes to the original position where i the last
button.it means the grid is not visible.when i press a gain that
button it is visible again?can anyone help me to solve this matter?


Tom John 07-04-2007 10:56 AM

RE: createchildcontrols fires before click event
 
Hi

You need to ensure that the Grid is created/displayed on every postback.

I am guessing you are creating/displaying the Grid only after the button is
clicked. Maybe set a flag in the ViewState to indicate whether the Grid
should be displayed or not and query that when creating the child controls as
to whether it should be displayed or not. Then use the button click event to
set the ViewState flag.

Hope this helps get you going. If you want a code sample, post what you've
got and I'll help out.

Cheers

Tom John


"hsnkamal@yahoo.com" wrote:

> i have developed a web part using class library.when i clicked a
> button it displayed a datagrid.after that i want to edit it.when i
> click a edit button it goes to the original position where i the last
> button.it means the grid is not visible.when i press a gain that
> button it is visible again?can anyone help me to solve this matter?
>
>



All times are GMT. The time now is 05:33 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.