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 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 this list of people with checkboxes next to their names. When you
I have the following problem: list.c struct nmlist_element_s { void *data; struct nmlist_element_s *next;
I have created a Map as follows: private Map<String, List<Client>> clientCatalogue; this.clientCatalogue = new
Let's say I have this foreach loop: foreach ($lists as $list) { if (next
I have next code in my Entity class class Role { private List<String> tubes;
i have the next class: public class Example { String name; Dictionary<String, decimal> data;
I have the next C code: #include <stdio.h> #include <stdlib.h> #include list.h #include graph.h
i have written the next code: public void delete(MyType instance) { List<MyType> myList =
I have a form with a list of people with check boxes next to
Say I have a list of items from a database. Next to each item

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.