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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:59:28+00:00 2026-06-15T12:59:28+00:00

How can I access DataGrid area not filled with Cells? I want to add

  • 0

How can I access DataGrid area not filled with Cells?

enter image description here

I want to add context menu for this area only

  • 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-15T12:59:30+00:00Added an answer on June 15, 2026 at 12:59 pm

    You can assign a ContextMenu to the DataGrid itself for the “Blank” area, but it will also appear for any rows you right-click on, if you don’t have a different context menu assigned to the rows (or the “DataGrid.RowStyle” property).

    The ‘workaround’ is to simply assign a different context menu to the rows, specifically.

    <DataGrid>
        <DataGrid.ContextMenu>
            <ContextMenu>
                <MenuItem Header="Menu Item in Blank Area" />
            </ContextMenu>
        </DataGrid.ContextMenu>
        <DataGrid.RowStyle>
            <Style TargetType="{x:Type DataGridRow}">
                <Setter Property="ContextMenu">
                    <Setter.Value>
                        <ContextMenu>
                            <MenuItem Header="Menu Item just for Populated Rows" />
                        </ContextMenu>
                    </Setter.Value>
                </Setter>
            </Style>
        </DataGrid.RowStyle>   
    </DataGrid>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I add limited access to only 1 specific user has access to
I'm attempting to create a custom DataGrid where I can format individual cells based
I have this scenario in my local network: [picture] http://fekt.datagrid.sk/DATA/stackoverflow/scenario.PNG Windows 2012: Only IIS
I can access this webpage in my firefox browser: http://www.ip-adress.com/ip_tracer/74.82.190.99 So I can get
I can access a module from code behind but not from the aspx page
I can access a method from a C++ Dll using C# using this method
I'm trying to replicate the same event you can do inside ms access datagrid
I have a WPF datagrid that is filled with an ObserverableCollection. Now I want
I can access the tags associated with a particular photo via the Graph API,
I can access Spring beans in my Servlets using WebApplicationContext springContext = WebApplicationContextUtils.getWebApplicationContext(getServletContext()); in

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.