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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:17:43+00:00 2026-06-11T19:17:43+00:00

I have a grid (table) like structure with rows and columns, and I am

  • 0

I have a grid (table) like structure with rows and columns, and I am assigning the background color for every cell using the border object.

How do I change the background color for every cell of the grid?

This is my approach:

  • Delete the border object and assign it a new one.

  • I have also tried to create a new Border object, and add it. But it throws InvalidOperationException stating “Element is already the child of another element”.

How can I change the background color for a particular table row?

  • 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-11T19:17:44+00:00Added an answer on June 11, 2026 at 7:17 pm

    Now that I better understand your question…

    The following code will give you the border in Row r and Column c.

    var border = myGrid.Children.OfType<Border>().Where(x => Grid.GetRow(x) == r && Grid.GetColumn(x) == c).FirstOrDefault();
    border.Background = [...];
    

    Hope this helps.

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

Sidebar

Related Questions

I have a schedule grid based on a HTML table using jQuery/jQuery UI drag
I have bind 2 separate tables using BindingSource. Left grid contains student table and
I'm using the Blueprint CSS grid for my HTML page. I have a table
basically I have a table grid like the one below, just a lot bigger.
I've got a wxpython grid, and I'm changing the background color of a cell
I have jQuery code which looks something like this on Button1 Click $('table.result_grid tbody
I have a grid bound to a BindingSource which is bound to DataContext table,
I have a bunch of coordinates in my table grid with the following schema
i have one question about jquery ajax().. I created a table grid and there
I have replaced a table containing four tables (in a grid) with a div-table

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.