473,386 Members | 1,828 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,386 software developers and data experts.

Accessing a parent web form control from within a nested user control?

Roy
How is it done? BTW, I'm reposting this here, as the datagrid newsgroup
appears functionally comatose...

I have a nested datagrid setup. When one updates the child grid using
edit, it also updates a field in the parent grid (the parent grid
update is done using a simple select query inside the child grid's
update sub). All is well, *however* after the update occurs the parent
grid is still displaying the old data even though the update has
occured. I was under the assumption that when I did a .databind() on
the child grid, the parent grid automatically reloaded? Well, evidently
it doesn't. :-/ In order to see the right data in the parent grid, I
have to leave the page then come back.

What do I do to get the parent grid to display the current data after
updating the child grid? I've tried many differents ways of getting
access to the parent grid from within the child grid's update sub, but
all have met with failure. Help!

Nov 19 '05 #1
1 1952
Every web control contains a property by the name of Parent - that's
one way. You might consider an alternative approach: raise an event.
Then the parent data grid can subscribe to the event and react if need
be, otherwise you'll have a tighter coupling between the two grids.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On 9 Feb 2005 04:30:14 -0800, "Roy" <ro**********@gmail.com> wrote:
How is it done? BTW, I'm reposting this here, as the datagrid newsgroup
appears functionally comatose...

I have a nested datagrid setup. When one updates the child grid using
edit, it also updates a field in the parent grid (the parent grid
update is done using a simple select query inside the child grid's
update sub). All is well, *however* after the update occurs the parent
grid is still displaying the old data even though the update has
occured. I was under the assumption that when I did a .databind() on
the child grid, the parent grid automatically reloaded? Well, evidently
it doesn't. :-/ In order to see the right data in the parent grid, I
have to leave the page then come back.

What do I do to get the parent grid to display the current data after
updating the child grid? I've tried many differents ways of getting
access to the parent grid from within the child grid's update sub, but
all have met with failure. Help!


Nov 19 '05 #2

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

Similar topics

7
by: Rab | last post by:
hi i need to programmatically change the caption of a label that is linked to another control (i.e. textbox, combobox). it's for a generic function where i only know the textbox/combobox name...
3
by: DonRex | last post by:
Hello all! I couldn't find a web application-newsgroup for ASP.NET, so I'm sorry if this is the wrong forum! Synopsis: In my webform I have 3 nested repeaters: rpWeeks ----- rpTime
5
by: Jim | last post by:
I have a user control that has two nested user controls within it. I have a method in the parent called CloseDetailsMaint, and I need to be able to call it from one of the child user controls that...
0
by: mollyf | last post by:
I have multiple user controls on a form. I have a save button on each control so the users can save as they go and on the parent form, I have another button which will save/update everything...
6
by: arvee | last post by:
Is there a way to access controls (and their properties) in a user control? The Web Form Designer marks controls as 'Protected' which makes them inaccessable from the host form. If I mark them as...
10
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
3
by: tshad | last post by:
I am trying to put together a user control (.ascx). Can you access an outside control from it? My control: login2.ascx ****************************************************************...
4
by: Richard Lewis Haggard | last post by:
What is the mechanism by which a child window can notify its parent that it has been clicked on? -- Richard Lewis Haggard www.Haggard-And-Associates.com
5
by: =?Utf-8?B?bXVzb3NkZXY=?= | last post by:
Hi guys I'm trying to make my code as streamlined as possible, and add CSS file references dynamically when they are required, for example, if a page contains a webcontrol, then the related CSS...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.