Using RadDomainDataSource in Childwindow

2 posts, 0 answers
  1. Almond
    Almond avatar
    43 posts
    Member since:
    Feb 2011

    Posted 21 Jun 2012 Link to this post

    Dear Telerik Gurus,

    Good pm.

    I just downloaded the trial version of Telerik and tried to implement to implement a childwindow calling a childwindow and returning a value.

    I have a childwindow with a RadDataForm for CRUD.  In this childwindo a placed a button where in it call another childwindow with a RadGridview where I select the value I want to place in a textbox in the Parent Childwindow.  Please see the codebehind how i implement the call to the other Childwindow.

    private void searchType_Click(object sender, RoutedEventArgs e)
        ServiceTypeSearch searchServiceTypeHldr = new ServiceTypeSearch();
        searchServiceTypeHldr.Closed += new EventHandler(searchServiceTypeHldr_Closed);
    void searchServiceTypeHldr_Closed(object sender, EventArgs e)
        ServiceTypeSearch searchServiceTypeResult = (ServiceTypeSearch)sender;
        if (!string.IsNullOrEmpty(searchServiceTypeResult._serviceTypeHldr))
            MessageBox.Show("Returned Value Not Null");
            serviceTypeBoxHldr.Value = searchServiceTypeResult._serviceTypeHldr;
            //sender = null;
            MessageBox.Show("Returned Value Null");
            //serviceTypeBoxHldr.Value = "";

    ServiceTypeSearch is my 2nd Childwindow.  In this childwindow form I a RadGridview populated
    by a RadDomainDataSource as below:

    <telerik:RadDomainDataSource x:Name="serviceTypeDS" AutoLoad="True" QueryName="GetV_servicetypeQuery"
                                     DomainContext="{StaticResource csisDC}"
                                     PageSize="14" Margin="15,10,320,12" Grid.Row="1"
                                     Grid.Column="1" LoadingData="serviceTypeDS_LoadingData"
            <telerikData:SortDescriptor Member="servicetype_desc"

    My problems is that the childwindow only populate the Grid on my initial click of the button.  If I close 
    the childwindow and try and open it again using the button, the RadGridview has no data and the
    RadDomainDataSource also does fire and load. 

    Can anyone point me out and a solution for the said problem?  I actually have 2 other buttons that calls
    other childwindow and the if I click any one of them, only the the first load of the childwindow populates
    the RadGridView.  All other childwindow with RadGridViews are empty. 

    Thank you in advance for your help.

    oh i forgot to mention, I am a newbie in Silverlight development.


  2. Almond
    Almond avatar
    43 posts
    Member since:
    Feb 2011

    Posted 03 Jul 2012 Link to this post

    Please disregard my inquiry and mark my post answered.

    I finally had it working using the MVVM.

    Thanks again.

  3. DevCraft banner
Back to Top