.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to force update all child controls values (like PropertyChanged but for entire child descendant

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :WPF


We need after event user fired (change at dataContext object) uptade all values binded to datacontext on controls descendant of grid control

¿Its is possible?


Julio Trujillo Leon. Microsoft Certified Professional Developer. .NET Developer and TFS admin. . Please, if my contribution is useful for you press on "useful button" Por favor, si les ha sido útil pulsen en "el mensaje ha sido útil" https://www.mcpvirtualbusinesscard.com/VBCServer/JulioTrujilloLeon/interactivecard

View Complete Post

More Related Resource Links

update parentpage gridview with the values from child page?


hi   i am having a gridview on each row i am having a update and add button.

on click of either of the button i am opening a popup where the end user will enter data and on clck of ok button in the child page

based on the click ie

if i clicked update i need to update that particular row with the values from child page.

if i clicked on add i need to add a row below the row where i clicked add button .

can anyone help me with this?

Orientation of child controls in UniformGrid

I have a list box that is bound to a list of images and uses a UniformGrid as an ItemPanel: <ListBox ItemsSource="{Binding Images}" SelectionMode="Extended" Name="ImageList"> <ListBox.ItemTemplate> <DataTemplate> <Image Source="{Binding}" Height="60" Width="80" Stretch="Uniform" Margin="2" VerticalAlignment="Center" HorizontalAlignment="Center"/> </DataTemplate> </ListBox.ItemTemplate> <ListBox.ItemsPanel> <ItemsPanelTemplate> <UniformGrid/> </ItemsPanelTemplate> </ListBox.ItemsPanel> </ListBox> This works great except for one thing. The child image controls are not centered horizontally within the layout grid columns. This is noticeable when you select an image from the ListBox and the blue highlight extends further on the right-hand side than on the left-hand side. How can I make sure the images are properly centered?

update/insert parent child at the same time

Hi Al, Is there a way to create a contact form that takes the name. address and other info for the master record; Then, somehow, on the same page, allow the user to enter multiple contact info as chid records (i.e. phone, email, etc.) All this using the Objec DataSource or SQL DataSource (which ever is easy) and doesn't require writing too much code. Any reference material welcomed. Thanks, rod.

Accessing controls / events on a master page from child page

I have a problem i am trying to work out the best method with my limited skills. Im using vb.net ( VS 2010  ) I am using a dll for an IFrame , which is call from code behind.  On my site I havea masterpage which has two gridviews. ( GrdViewWebBureau is the one i am using for this  query)  GrdViewWebBureau is contained within an update panel and updated on a timer control trigger. GrdViewWebBureau updates the page with file counts and status from our clients. I can click on any one of the cells and the code behind is fired. What I am trying to do is put an IFrame on the master page and every time a user clicks on the grid, the Iframe is fired up.  I have tested the iframe and vb code behind from a dummy page and it works, however when the Iframe is on the master page it doeant work.  What I am tryingh to achieve is that no matter what page a user is on the site, they will be able to click on the GrdViewWebBureau and the iframe will fire with the correct childpage. Each webPage may also have an Iframe as well, so i dont know if it is possible to make the IFrame global and just call that control ??  I have no idea if 1 this is possible with the code i have and 2, if i have the brains to understand the who what why and when. Please can you look at my code and pass anyt suggestions / help /  solutions. Master Pa

i want to disable the entire parent window when the child window is opened?



 i am using the master page from the master page i am opening the child window.so, when ever i opened the child window i want to disable the entire parent window(all the controls present in the parent page) .how can we do it.


Burepalli V S Rao.

Find all child controls of a type



Given a normal WPF Window object, I want to walk the list of all controls contained in that Window and find all objects of a specific type...i.e. all of my UserControl objects that were placed in the XAML definition of that Window.  What's the best way to do that?


Not able to access child controls in user control using javascript



I have a user control "SettingsControl" containing an ajax:CollapsiblePanelExtender which in turn has a GridView (gridView) and checkBoxes. On top of GridView we have two LinkButtons "Select All" and "Clear All". I have written to enable select all and clear all functionality. Select All should select all the rows in the grid by calling the following JavaScript written on the Client .aspx file.

function SelectAll(chk)
    //get reference of GridView control
    var grid = document.getElementById('<%= SettingsControl1.FindControl("gridView").ClientID %>');
    //variable to contain the cell of the grid
    var cell;

    if (grid.rows.length > 0)
        //loop starts from 1. rows[0] points to the header.
        for (i=1; i<grid.rows.length; i++)
            //get the reference of first column
            cell = grid.rows[i].cells[0];


How to get child controls in a Webpart?


I have 2 controls in a webpart, a label and a button.

In button click event, I want change the button and label's text.

In the event, I can change the button1's text but cannot change the text by instance referent.


But I can use ((Lable)this.Controls[0]) to get the label control to change the text.


in debug mode, this.Controls[0] != lable1, this.Controls[1] == button1.


Is there any easier way to get childcontrol?


Thanks a lot!

update value from Child page to parent page


hi all,

I am having 1 parent page associated with master page. From that parent page 1 child window is open. Now i enter some text into textbox & if i click on update button then text should be updated in parent textbox. & child window should be closed.

If i use Parent page without master page then its working fine but if i use Master page ,its not working. I think parent page object is not getting if i use Master page.

Event bubbling - Mousehover event for child controls



I have a form and some controls inside it.

I want to fire an event when user enter the form and when he leaves the form .

this.MouseEnter += (sender, e) =>
   //do stuff

this.MouseLeave += (sender, e) =>
   //do stuff

the problem with that is when I move mouse over the child control, form's mouseleave event is triggered.

I don't want this to happen (even if the mouse over control is still over the form).


How to solve that?

I don't want to set any events on the children (because there are many controls and some of them create dynamically).

I also don't want to use any timers to check the position....

I know I can use IMessageFilter, and add to application:

 Application.AddMessageFilter(new MyMessageFilter());
 public bool PreFilterMessage(ref Message m)
if (m.Msg == 0x2a1) { }
But this will fire for entire application and not just for one form, and I don;t know how to detect inside PreFilterMessage the current control.



GridView Parent Child View with JQuery Effects

I was just checked how to add some more cool effects to the GridView control using JQuery. In this post I will display parent-child data in the GridView control with some help of the wonderful JQuery library.

Let's first populate the GridView control.

GridView control to show master-child or master-slave data, written in c#, asp.net

I previously made a master slave datagrid using Visual Studio 2003 .Net (original article) that would allow users to show data to clients using collapse and expand features. These features however did not carry over to gridview for many users. This tutorial will explaing how to create a collapsable/expandable gridview in frameworks 2.0 and higher

Display column from child table. Possible ?



I'am using dnamic entity with EF4. On a list page of a table, I would like to display a column containing information from a child table of the current element. Sample :

Order List :

Order Data | Required Date | Shipped Date | etc... | ... | Customer Name (foreign key with tostring() method override) | Customer Postal Code (Column that I want to add) |

I don't known how to do that. Is it possible ? Maybe I have to to create my own Metadata proxy that will add dynamicly a column on the MetaColumn list of the table.

Does someone have an easier or better idea ?

Thank you for any help.

Display homepage node along with child nodes


If the first Sitemap node is your homepage/default and all other nodes are supposed to be children / grandchildren of the first sitemap node in a web.sitemap, how do I set up my web.sitemap to enable me to display my cssFriendlyMenu with the homepage node along with the nodes that are 1 level down from it at the same time as in :

Home   Products   Services   About us


...or is it not possible to have the first sitemap node displayed along with the nodes that are 1 level down from it?  Do I need to have a different starting node rather than my homepage node?

How to keep the hover for Parent menu and set the selected menu item css for child menu item?



I'm using cssfriendly control adapter for menu. My asp.net menu control's datasource is a sitemap file I'm using which contains all the urls.

I have the following questions:

  1. Is there a way to keep the parent menu item hovered while hovering over the respective child menu items?
  2. Is there a way to keep the child menu item selected? I am able to set the css for the parent menu, however I was wondering if the same is possible with the child items.

Please help! Smile


Moneka Smile

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend