473,396 Members | 1,865 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,396 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 21 '05 #1
1 1098
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Amir Eshterayeh | last post by:
Dear Friends Hope things goes well to you. I have this problem. Would you please give me your solution? I want to change a property that I define on my user control in my web form that contains...
0
by: Ewok | last post by:
Im having trouble getting the values of form fields when the form is in an included user control form01.ascx is loaded via loadcontrol in a select case statement in the main page and everything...
1
by: Richard | last post by:
Hello MyMainWebPage.aspx contains MyUserControl.ascx MyUserControl.ascx has a DataTable Property MyDataTable
0
by: Nick Lewis | last post by:
I'm trying to process an event raised by a user control in the web form that contains that control. I've fathomed out how to handle the event within the control but how can I then pass it on to...
3
by: Celine | last post by:
Hi, I am just starting developping in ASP.Net and I have some trouble using a user control in a web form. In my user control I have a datagrid with hyperlink and in my web page I want to...
2
by: Christian Ista | last post by:
Hello, I have a usercontrol on page, this one is place on a panel. On the page there is some others panel and controls on it. I'd like from the user control use a another control on the...
4
by: Charles Law | last post by:
Can anyone think how I could get a user control to host a Windows form? In fact, what I actually want to do is have a docked toolwindow within a user control, along with another user control. ...
0
by: Sharat Koya | last post by:
Hi, I have a user control that pops up much like intelisense in visual studio to display a range of navigable options when a key combo is pressed within a textbox. I have called the user control...
5
by: Guy Noir | last post by:
I have a quick question on custom controls. I have a control that I created with a class that extends the NumericUpDown control. My problem is that when I use this usercontrol on my form, the...
4
by: Mrozu | last post by:
Hi, i've got an inherited usercontrol with added DataGridView. I plant my control on form and I want to hide datagridview when user click on that form. I've tried to use LostFocus and...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.