473,322 Members | 1,480 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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

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 17 '05 #1
1 1855
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 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: dickson.matt | last post by:
OK, I have created a user control that contains a dropdown for office locations. Here is the code.... Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles...
0
by: Tim Haughton | last post by:
I've just released an article on using Test Driven Development with C# and Windows Forms. GUI's are often difficult to test, so I thought it might be of interest. The article along with the...
5
by: Dave | last post by:
How do I check in a Windows Forms app if any controls have changed? I have a form that collects data, and I want to prompt the user if they try to exit the app, or load a new file, without saving...
0
by: Not Available | last post by:
I have windows form user control which I load into the browser via this ascx web user control and it works. The process is explained at this link:...
1
by: serge calderara | last post by:
Dear all, I have created a simple user control (server Button) with a public property define has follow: Public Property value() As Integer Get 'return value Return ViewState("Value") End...
1
by: Richard | last post by:
Hello MyMainWebPage.aspx contains MyUserControl.ascx MyUserControl.ascx has a DataTable Property MyDataTable
3
by: anadimpa | last post by:
Hello all I build a javascript function string in the code behind and register it in the Page_Load of my User Control. I do this because I build the javascript based on some variables that are...
21
by: Dan Tallent | last post by:
In my application I have a form (Customer) that I want to be able to open multiple copies at once. Within this form I have other forms that can be opened. Example: ZipCode. When the user enters...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.