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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:55:39+00:00 2026-05-17T16:55:39+00:00

I haven’t been able to find anyway to dynamically add a border around a

  • 0

I haven’t been able to find anyway to dynamically add a border around a column in a silverlight datagrid. Here is my xaml of my datagrid:

<sdk:DataGrid x:Name="PlannedAndBookedMonthlyTable" ItemsSource="{Binding}" AutoGenerateColumns="False" Margin="5,0,5,5">
   <sdk:DataGrid.Columns>
      <sdk:DataGridTextColumn x:Name="MonthlyHeaderName" Header="" Binding="{Binding SeriesName}" />
      <sdk:DataGridTextColumn x:Name="MonthlyHeaderJan" Header="Jan" Binding="{Binding JanValue}" />
      <sdk:DataGridTextColumn x:Name="MonthlyHeaderFeb" Header="Feb" Binding="{Binding FebValue}" />
      <sdk:DataGridTextColumn x:Name="MonthlyHeaderMar" Header="Mar" Binding="{Binding MarValue}" />
      <sdk:DataGridTextColumn x:Name="MonthlyHeaderApr" Header="Apr" Binding="{Binding AprValue}" />
      <sdk:DataGridTextColumn x:Name="MonthlyHeaderMay" Header="May" Binding="{Binding MayValue}" />
      <sdk:DataGridTextColumn x:Name="MonthlyHeaderJun" Header="Jun" Binding="{Binding JunValue}" />
      <sdk:DataGridTextColumn x:Name="MonthlyHeaderJul" Header="Jul" Binding="{Binding JulValue}" />
      <sdk:DataGridTextColumn x:Name="MonthlyHeaderAug" Header="Aug" Binding="{Binding AugValue}" />
      <sdk:DataGridTextColumn x:Name="MonthlyHeaderSep" Header="Sep" Binding="{Binding SepValue}" />
      <sdk:DataGridTextColumn x:Name="MonthlyHeaderOct" Header="Oct" Binding="{Binding OctValue}" />
      <sdk:DataGridTextColumn x:Name="MonthlyHeaderNov" Header="Nov" Binding="{Binding NovValue}" />
      <sdk:DataGridTextColumn x:Name="MonthlyHeaderDec" Header="Dec" Binding="{Binding DecValue}" />
      <sdk:DataGridTextColumn x:Name="MonthlyHeaderTotal" Header="Total" Binding="{Binding Total}" />
   </sdk:DataGrid.Columns>
</sdk:DataGrid>

This is the effect that I want to accomplish:

alt text

How do I set the border on a column of data that depends on what current calendar month it is?

  • 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-17T16:55:40+00:00Added an answer on May 17, 2026 at 4:55 pm

    Each row in a DataGrid is a template, as is each cell. The normal DataGrid has no concept of cells and current cell positions, just selected rows.

    If you were able to get enough positional information I would say you could overlay a border over the DataGrid, but the debugger shows me there is not enough information available in a DataGrid to even calculate the position of the current selected cell.

    One possible option

    The only way I can think of doing this with a DataGrid is catching focus events on the individual cell controls (e.g. TextBoxes in the DataGrid) and use the position of the selected control relative to the parent to work out the border position. Each column will need to be a templated column so that you can hook up the GotFocus events.

    Otherwise…

    …you will need to try a different sort of control to get the result you are seeking.

    You could use a plain old Grid, e.g. full of TextBox controls, but you will need to handle selection and keyboard navigation of the grid yourself.

    If budget permits, I would look around for a 3rd party spreadsheet control for Silverlight. Otherwise see if anyone has built one on Codeplex or elsewhere.

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

Sidebar

Related Questions

I haven't been able to find a solution for getting an Objective-C and XAuth
I haven't been able to find what these Xcode icons mean. Some you can
I haven't been able to solve this prolog exercise. I was hoping someone here
I haven't been able to find authorative explanations, microformats or guidelines for the following,
I haven't been able to find an answer on Wikipedia (or SO) or in
Haven't seen anything about it here but it seems to solve one of the
I haven't worked with SQL Reporting much, however I have been trying to get
Haven't been programming in JS for a while. Now, I have following thing: <html>
Haven't been coding in a bit, but took on a project for a friend.
I haven't used the implements keyword before, and I've been trying to use it

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.