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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:22:05+00:00 2026-06-06T11:22:05+00:00

So i got this DataGrid in which i manually defined all the columns: <DataGrid

  • 0

So i got this DataGrid in which i manually defined all the columns:

     <DataGrid AutoGenerateColumns="False" <lotsofstuff> ItemsSource="{Binding}">
                    <DataGrid.Columns>
                        <DataGridTextColumn Header="firstname" x:Name="firstname" Binding="{Binding Path=firstname}" />
                        <DataGridTextColumn Header="lastname" x:Name="lastname" Binding="{Binding Path=lastname}" />

                        <DataGridCheckBoxColumn Header="sick" x:Name="sick" Binding="{Binding Path=sick}"/>
                        <DataGridCheckBoxColumn Header="vacation" x:Name="vacation" Binding="{Binding Path=vacation}" />
                    </DataGrid.Columns>
                </DataGrid>

Filling it with a datatable works fine so far:

    DataGrid.ItemsSource = DataTable.DefaultView;

But in my datatable exists is a 5th bool column and i want my DataGrid to display a certain picture if it’s true and another one if it’s false.

How do i do that? I have no clue.

  • 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-06T11:22:06+00:00Added an answer on June 6, 2026 at 11:22 am

    Create a DataGridTemplateColumn with an Image within the CellTemplate. The Image Source property will be a binding expression, something like this:

    {Binding Path=., Converter={StaticResource DataToImageConverter}}
    

    Create an implementation of IValueConverter for DataToImageConverter (for example) to take the DataItem {Binding} – which will include your bool value, and within the converter you can return whatever image you like.

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

Sidebar

Related Questions

I've got a DataGrid with 6 columns: ComboBox;ComboBox;CheckBox;CheckBox;CheckBox;TextBox I'm trying to populate this DataGrid
I've got an ArrayCollection which is properly displayed in this Advanced Datagrid: <mx:AdvancedDataGrid id=drawingDataDG
I've got an asp:DataGrid which has an asp:Gridview within it and this has many
I got a datagrid(dg) which is bound with an observable collection of POCO [Name(string),
I've got a table Houses and Cats, which contains the columns Id and HouseName
I've got a datagrid with checkboxes which calls a routine called checkbox_CheckedChanged. So far,
<DataGrid Name=grid HorizontalAlignment=Left VerticalAlignment=Top IsReadOnly=False HeadersVisibility=None AutoGenerateColumns=True AutoGeneratingColumn=c_dataGrid_AutoGeneratingColumn> public static DataView GetBindable2DArray<T>(this T[,] array)
I've got this issue: I've got a dataGrid where whenever I set the column
I've got a datagrid containing part objects, consisting of a handful of template columns.
I have a DataGrid that I'm binding to DataTable that got filled by 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.