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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T13:02:33+00:00 2026-06-08T13:02:33+00:00

New to programming and need a little assistance. I have a WPF usercontrol used

  • 0

New to programming and need a little assistance. I have a WPF usercontrol used for an Outlook Add-in and everything was going swimmingly until I tried a datagrid with a datepicker in the celleditingtemplate column but the celltemplatecolumn simply has a textblock. The idea is to have the textblock bound to the datasource (which is working fine) and when the user edits the column, the datepicker shows and the user can select a date. I simply cannot figure out how to send the value from the selecteddate to the textblock and I’m completely at my wits end. Below is the datagrid with its bindings, simple SQL table with the following fields, [Project],[Deadline],[DaystoDeadline],[Responibility],[ProcessCount],[TasksCompleted],[TasksRemaining]. Any assistance would be greatly appreciated.

            <Grid>
                <DataGrid AutoGenerateColumns="False" HorizontalAlignment="Left" Margin="6,0,0,0" Name="ProjectsGrid" ScrollViewer.CanContentScroll="True" VerticalAlignment="Top" VerticalScrollBarVisibility="Auto" ItemsSource="{Binding}" CanUserAddRows="False" CanUserDeleteRows="False">
                    <DataGrid.Columns>
                        <DataGridTemplateColumn Header="Commands">
                            <DataGridTemplateColumn.CellTemplate>
                                <DataTemplate>
                                            <Button Click="Select_Button" Content="Select" Name="SelectButton" />
                                </DataTemplate>
                            </DataGridTemplateColumn.CellTemplate>
                        </DataGridTemplateColumn>
                        <DataGridTextColumn Binding="{Binding Project}" Header="Project" IsReadOnly="True" FontFamily="Verdana" />
                            <DataGridTemplateColumn Header="Deadline">
                                <DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding Deadline, StringFormat='yyyy/MM/dd'}" FontFamily="Verdana" x:Name="DeadlineTxt" />
                                    </DataTemplate>
                                </DataGridTemplateColumn.CellTemplate>
                                <DataGridTemplateColumn.CellEditingTemplate>
                                    <DataTemplate>
                                        <DatePicker SelectedDate="{Binding Deadline, StringFormat='yyyy/MM/dd'}" FontFamily="Verdana" x:Name="DeadlineDatePicker">
                                            <DatePicker.CalendarStyle>
                                                <Style TargetType="Calendar">
                                                    <Setter Property="DisplayMode" Value="Month"/>
                                                </Style>
                                            </DatePicker.CalendarStyle>
                                        </DatePicker>
                                    </DataTemplate>
                                </DataGridTemplateColumn.CellEditingTemplate>
                            </DataGridTemplateColumn>
                        <DataGridTextColumn Binding="{Binding DaystoDeadline}" Header="Days to Deadline" IsReadOnly="True" FontFamily="Verdana" />
                        <DataGridTextColumn Binding="{Binding Responsibility}" Header="Responsibility" IsReadOnly="True" FontFamily="Verdana" />
                        <DataGridTextColumn Binding="{Binding Processes}" Header="Processes" IsReadOnly="True" FontFamily="Verdana" />
                        <DataGridTextColumn Binding="{Binding Completed}" Header="Completed" IsReadOnly="True" FontFamily="Verdana" />
                        <DataGridTextColumn Binding="{Binding Remaining}" Header="Remaining" IsReadOnly="True" FontFamily="Verdana" />
                    </DataGrid.Columns>
                </DataGrid>
  • 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-08T13:02:35+00:00Added an answer on June 8, 2026 at 1:02 pm

    I would start by taking off the names of the controls in the DataTemplate (x:Name="DeadlineTxt" x:Name="DeadlineDatePicker") and remove the StringFormat from the SelectedDate: (SelectedDate="{Binding Deadline}")

                <DataGridTemplateColumn Header="Deadline">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Deadline, StringFormat='yyyy/MM/dd'}" FontFamily="Verdana" />
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                    <DataGridTemplateColumn.CellEditingTemplate>
                        <DataTemplate>
                            <DatePicker SelectedDate="{Binding Deadline}" FontFamily="Verdana" >
                                <DatePicker.CalendarStyle>
                                    <Style TargetType="Calendar">
                                        <Setter Property="DisplayMode" Value="Month"/>
                                    </Style>
                                </DatePicker.CalendarStyle>
                            </DatePicker>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellEditingTemplate>
                </DataGridTemplateColumn>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm completely new to GUI programming and need a little help with a list
I am new to programming and web designing. I need a little help. Whiteboard
i am new to programming and i need your help... i have a label
Hi I am new to iOS programming and I need a little help. I
I'm new to iOS programming and I need to implement a location aware application.
I am relatively new to programming. I need to calculate the aspect ratio(16:9 or
I really need your help for this. I am relatively new to programming and
I'm new to GUI programming, but need to create a multiple window GUI. Does
I'm new to web programming, so I need some help. I am writing a
I've been programming for a while and have used LINQ-To-SQL and LINQ-To-Entities before (although

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.