|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Windows Form and Windows Form User Control - Where Is The Method That Would corresspond To A Web ForMyMainWebPage.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 Page load or even constructor after the initializecomponent call will be
fine. -- Show quoteHide quoteBob 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. "Richard" <a@b.com> wrote in message news:U8Z2e.45959$rB3.8748817@twister.nyc.rr.com... > 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 > >
Visual Basic .Net List Box
Hiding items in base classes Problems with pictureboxes and memory usage detect mouse event on node of a treeview newbie stupidity: opening one form and closing another How can I loop through all of the messages in the inbox - VB.NET E FTP client SqlCommand w/ Params Select Issue Using the IN Clause Array.Length vs Array.GetUpperBound(0) -- any real differences? VB.NET - Automation - DLLs |
|||||||||||||||||||||||