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

  • Home
  • SEARCH
  • 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 6154613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:17:33+00:00 2026-05-23T20:17:33+00:00

i have the next list: SortedList<Decimal, KeyValuePair<string,string>> datos; And i need display this in

  • 0

i have the next list:

SortedList<Decimal, KeyValuePair<string,string>> datos;

And i need display this in datagrid. But i have one problem. In a sorted list exists KEY and VALUE. This is it.
But as a show within a SortedList KeyValuePair not. I suggest that you can put it in the XAML to specify the key and value into the SortedList KeyValuePair?
My datagrid code is :

  <my:WpfDataGrid AutoGenerateColumns="False" Estilo="StlWpfDataGridAlternatingRows" Estilo_Header="WpfDataGridColumnHeaderAzul" IsReadOnly="False" ItemsSource="{Binding}" Margin="12,12,12,354" Name="dataGridPresentacionPrincipal" SelectionChanged="dataGridPresentacionPrincipal_SelectionChanged">
                <my:WpfDataGrid.Columns>
                    <mic:DataGridTextColumn  Binding="{Binding Key,Mode=OneWay}" Header="Codigo" SortDirection="Ascending" Width="80">
                        <mic:DataGridTextColumn.ElementStyle>
                            <Style TargetType="TextBlock">
                                <Setter Property="TextAlignment" Value="Right" />
                            </Style>
                        </mic:DataGridTextColumn.ElementStyle>
                    </mic:DataGridTextColumn>
                    <mic:DataGridTextColumn Binding="{Binding Value,Mode=OneWay}" Header="Descripcion" SortDirection="Ascending" Width="920" />
                <!--<mic:DataGridTextColumn Binding="{Binding Value,Mode=OneWay}" Header="Producto" SortDirection="Ascending" Width="920" />-->
            </my:WpfDataGrid.Columns>
            </my:WpfDataGrid>

On second column, need a key KeyValuePair. And de third column need a value KeyValuePair. Thank you!

  • 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-23T20:17:35+00:00Added an answer on May 23, 2026 at 8:17 pm

    I think that you’re asking to bind to the child properties of the value (i.e. the KeyValuePair), right? The binding will follow child properties through a dot-notation. Something like

    <mic:DataGridTextColumn Binding="{Binding Value.Key,Mode=OneWay}" Header="Descripcion" SortDirection="Ascending" Width="920" /> 
    <mic:DataGridTextColumn Binding="{Binding Value.Value,Mode=OneWay}" Header="Producto" SortDirection="Ascending" Width="920" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the next batch file, but its matching by file name. This time
In my fieldset I have labels next (side) to my textboxes, but for some
Scenario: You have an ASP.Net webpage that should display the next image in a
I have a list structure like this: <ul id=part> <?php $i=0; foreach ($q as
I have a little problem, hope You can help me. I have next array
I have a a list of items i want to display inside of a
I'm going to start of by noting that I have next to no python
I have the next function: function setImagesWidth(id,width) { var images = document.getElementById(id).getElementsByTagName(img); for(var i
How could I best implement the following scenario? I have a Next Period... button
I have First/Last/Previous/Next buttons that change the selected child node of a TreeViewItem. Setting

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.