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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:41:55+00:00 2026-06-09T22:41:55+00:00

i have datagrid in my project which i bind my attributes collection like this:

  • 0

i have datagrid in my project which i bind my attributes collection like this:

<DataGrid 
    Grid.Row="1"
    ItemsSource="{Binding Attributes}" 
    AutoGenerateColumns="False"
    Margin="5"
    >
    <DataGrid.Columns>
        <DataGridTextColumn Width="3*" Header="Name" IsReadOnly="True" Binding="{Binding name}" />
        <DataGridTextColumn Width="3*" Header="Field" Binding="{Binding field}" />
        <DataGridTextColumn Width="3*" Header="Type" Binding="{Binding type}" />
        <DataGridTextColumn Width="3*" Header="Value" Binding="{Binding value}" />

the problem is that name, field and type are string and value is a list. how can i bind it to the Datagrid in this way:

Name     Field     Type    Value
-----   -------   ------   -----
name1   xField1   xType1     1
name1   xField1   xType1     2
name1   xField1   xType1     3
name1   xField1   xType1     4
name1   xField2   xType2     5
name2   xField2   xType2     20
name2   xField2   xType2     30
name2   xField2   xType2     40
name3   xField3   xType3     100

ItemsSource=”{Binding Attributes}” in my case Attributes is a list of 3 values (name1, name2, name3).

  • 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-09T22:41:57+00:00Added an answer on June 9, 2026 at 10:41 pm

    Assuming like you said value is a List(). If so, you possibly try to make a DataGridTemplateColumn instead of a DataGridTextColumn and make a datatemplate that holds a list or listview then each row will have a listbox/listview that show all the values that apply to that row. If you just want to show the count of value then you leave everything the way it is and just bind Value.Count . Hope this helps a little 🙂

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

Sidebar

Related Questions

In my project I have an Xceed data grid which is bound to a
I have a datagrid control in my project which has a combobox control manually
In my project I am binding an observable collection to a datagrid. Every column
I'm working on a flex project, and have a datagrid that I'd like the
I am working on a WPF MVVM Project. Now i have a DataGrid in
I have a datagrid in C#.net I have made some columns in grid editable.
I have a DataGrid in WPF bound to an observable collection. In my UI
I have a DataGrid that represents layers - each row is an image on
I have a datagrid view which is editable. I'm getting the value of a
I have a specialprice lookup window in my silverlight project which is bound to

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.