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 8986111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:28:26+00:00 2026-06-15T21:28:26+00:00

I have two list views, a parent that contains a child list view with

  • 0

I have two list views, a parent that contains a child list view with its item template.

<ListView Name="TopView">
    <ListView.ItemTemplate>
        <DataTemplate>
             <ListView ItemsSource="{Binding SubList}"Focusable="False">
                  <ListView.Background>
                        <SolidColorBrush Color="Transparent"/>                                                  
                  </ListView.Background>
                  <ListView.ItemTemplate>
                        <DataTemplate>
                            <Grid HorizontalAlignment="Stretch">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="50" />
                                    <ColumnDefinition Width="50" />
                                    <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                                <TextBlock Text="{Binding Path=Number}" Grid.Column="0" />
                                <TextBlock Text="{Binding Path=Type}" Grid.Column="1" />
                                <TextBlock Text="{Binding Path=Code}" Grid.Column="2"  />
                            </Grid>
                        </DataTemplate>
                  </ListView.ItemTemplate>
             </ListView>
        </DataTemplate>
    </ListView.ItemTemplate>
</ListView>

Whenever attempting to use TopView.SelectedValue, the value returned is always null.

How can I make the parent ListView be the only ListView to accept selection events instead of the child ListView? I figure I need to do something with event routing but I’m not sure what.

  • 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-06-15T21:28:27+00:00Added an answer on June 15, 2026 at 9:28 pm

    Ok, did not expect that you mix databinding with manual filling. I assume that your inner Listview consumes the select-event. You’ll have to bubble that one up in the tree until you hit TopView. set the e.handled property in the inner Listview’s handler to false after processing it should raise the event for the next listview, iirc.

    private void handleInner(object o, RoutedEventArgs e)
    {
        InnerControl innerControl = e.OriginalSource as InnerControl;
        if (innerControl  != null)
        {
            //do whatever
        }
        e.Handled = false;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom list view which contains two text views and on button.
I have implemented a list view. Each item in my list view has two
I have two views in my ViewFlipper . One of views contains a ListView
I have a ListView with few elements, each item contains two buttons with a
Ho I have two list view on a frame layout. I want one overlay
I have made a list view containing two childs. Now i am trying to
I created one simple list view. i have two list view, my 1st list
So I have a custom ListView object. The list items have two textviews stacked
I have a view, which is having two sub views, while adding those two
I have a ListView that has one image and two lines of texts for

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.