Skip to content

How to add menu items conditionally for some cells or row headers? #242

Answered by anmcgrath
sankarkumarP66 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi all, wanted to add to what @deanparker-web wrote (thanks for giving the code.)

You can indeed use the ActiveRegion to determine which row is being selected. I would just add that you can use

if(sheet.Selection.ActiveRegion is RowRegion r && Satisfies(r.Top)){
// show your menu items if the row satisfies
}

to only show specific menu items for certain rows.

If you wanted to show a caret for the row headings only on specific rows you can use the RowHeaderTemplate.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@sankarkumarP66
Comment options

@deanparker-web
Comment options

@anmcgrath
Comment options

Answer selected by sankarkumarP66
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants