all groups > dotnet windows forms > march 2005 >
You're in the

dotnet windows forms

group:

Windows Form and Windows Form User Control - Where Is The Method That Would corresspond To A Web Form Pre_Render Method


Windows Form and Windows Form User Control - Where Is The Method That Would corresspond To A Web Form Pre_Render Method Richard
3/31/2005 8:33:56 PM
dotnet windows forms:
Hello



MyMainWebPage.aspx contains MyUserControl.ascx



MyUserControl.ascx has a DataTable Property MyDataTable



MyUserControl.ascx has a DataGrid which whose datasource is MyDataTable (or
technically it's private accessor but that I don't think is an issue here)



MyMainWebPage creates a DataTable dt . I then do a
"MyUserControl.MyDataTable = dt"



In order for the data to appear in the user control grid I must do the
"MyUserControl.MyDataTable = dt" in the Pre_Render of MyWebPage



I want to do this type of thing with a window form and windows user control.
Where in the windows form user control would I bind the datatable? If I do
it in the user controls page_load it does show the data in the datagrid?



Thank you,



Richard

Re: Windows Form and Windows Form User Control - Where Is The Method That Would corresspond To A Web Form Pre_Render Method Bob Powell [MVP]
3/31/2005 11:42:58 PM
Page load or even constructor after the initializecomponent call will be
fine.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





[quoted text, click to view]

AddThis Social Bookmark Button