By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,693 Members | 1,560 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,693 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.

"Richard" <a@b.com> wrote in message
news:U8*********************@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

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.