Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7018469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:03:19+00:00 2026-05-27T23:03:19+00:00

I have a DataGrid. The ItemsSource of this DataGrid is set in the Completed

  • 0

I have a DataGrid. The ItemsSource of this DataGrid is set in the Completed event of a WCF call.However, when adding a Detail Datagrid inside the master grids DataTemplate and naming it appropriately… Ineed to fill it master grids selection change event but my codebehind does not recognise the detail grid. I cant set the ItemsSource of grdDetail like I do with grdMaster.So how i can fill my detail datagrid ?

Xaml File

  <Grid x:Name="LayoutRoot">

    <sdk:DataGrid x:Name="dgCustList" AutoGenerateColumns="False" Background="Transparent" SelectionChanged="dgCustList_SelectionChanged">
        <sdk:DataGrid.RowDetailsTemplate>
            <DataTemplate>
                <StackPanel x:Name="stkPanel">
                    <sdk:DataGrid x:Name="dgCustDetail" RowDetailsVisibilityMode="VisibleWhenSelected" AutoGenerateColumns="False"  Background="Transparent"/>
                </StackPanel>
            </DataTemplate>
        </sdk:DataGrid.RowDetailsTemplate>
    </sdk:DataGrid>
    <Grid.Projection>
        <PlaneProjection x:Name="Projection"/>
    </Grid.Projection>
</Grid>

And CodeBehind

  public MusteriListe()
    {
        InitializeComponent();
        var stb1 = new Storyboard { Duration = new Duration(TimeSpan.FromSeconds(1)), SpeedRatio = 3 };

        var daY1 = new DoubleAnimation { From = 0.00, To = 90.00 };
        Storyboard.SetTargetName(daY1, "Projection");
        Storyboard.SetTargetProperty(daY1, new PropertyPath("RotationX"));
        stb1.Children.Add(daY1);
        this.Resources.Add("EndOfPage", stb1);

        var stb = new Storyboard();
        stb.Duration = new Duration(TimeSpan.FromSeconds(1));
        stb.SpeedRatio = 3;

        var daY = new DoubleAnimation { From = -90.00, To = 0.00 };
        Storyboard.SetTargetName(daY, "Projection");
        Storyboard.SetTargetProperty(daY, new PropertyPath("RotationX"));
        stb.Children.Add(daY);
        Resources.Add("StartOfPage", stb);

        dgCustList.Columns.Add(new DataGridTextColumn
        {
            Header = "ID",
            Binding = new Binding("CustomerID")
        });
        dgCustList.Columns.Add(new DataGridTextColumn
        {
            Header = "Müşteri Ad",
            Binding = new Binding("CustomerName")
        });
        dgCustList.Columns.Add(new DataGridTextColumn
        {
            Header = "Müşteri Soyad",
            Binding = new Binding("CustomerSurname")
        });
        dgCustList.Columns.Add(new DataGridTextColumn
        {
            Header = "Müşteri Tel",
            Binding = new Binding("CustomerPhone")
        });
        LoadGrid();
    }
    private void LoadGrid()
    {
        var client = new EczServiceClient();
        client.CustomerInfoCompleted += client_CustomerInfoCompleted;
        client.CustomerInfoAsync();
    }
    void client_CustomerInfoCompleted(object sender, CustomerInfoCompletedEventArgs e)
    {
        dgCustList.ItemsSource = e.Result;
    }

    private void dgCustList_SelectionChanged(object sender, SelectionChangedEventArgs e)
    {

        var customer = dgCustList.SelectedItem as CustomerInfo;
        if (customer == null) return;
        var client = new EczServiceClient();
        client.CustomerDetailCompleted += client_CustomerDetailCompleted;
        client.CustomerDetailAsync(customer.CustomerID);

    }
    void client_CustomerDetailCompleted(object sender, CustomerDetailCompletedEventArgs e)
    {
        IN HERE I WANT TO FILL DATAGRID LIKE MASTER GRID BUT ITS NOT LET ME ( dgCustDetail.ItemSource = e.Result)
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:03:19+00:00Added an answer on May 27, 2026 at 11:03 pm

    You did NOTdefine binding for you detail data grid and you set the autogenerate columns to false. You need to define the binding either in XAML or in code behind before the client_CustomerDetailCompleted event fires. Simply setting the item source alone won’t work because the detail datagrid does not contain columns. This is where MVVM pattern comes in handy.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a datagrid who's ItemsSource is a strongly typed IEnumerable object In this
I have a Silverlight DataGrid and I have set the ItemsSource to an instance
I have a data grid that looks like this <tk:DataGrid ItemsSource={Binding Parents} AutoGenerateColumns=False> <tk:DataGrid.Columns>
I have List<List<double>> with values and wpf datagrid. How can I set this as
I have created a WPF tooklit datagrid in C# and the ItemsSource is set
I'm creating a DataGrid where I set ItemsSource of the grid to a WCF
I have a DataGrid in a WPF application which has for its ItemsSource a
I have a simple Silverlight app which simply sets a DataGrid's ItemsSource to the
I have a simple datagrid to which I am binding a collection using ItemsSource.
I have a datagrid whose itemsSource is bound to a multiconverter which uses a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.