Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
471
Change the image column when click the contextmenu in wpf grid
posted

Hi all,

 

     Iam using infragistics  xam  grid.i kept a image of green color with context menu   by giving  static resource  for cell  value presenter in a column in my grid..

if i right click the image  and select any  menu i want to change the color of the image in tat column..

can any one tell me how to do..pls send the code..

 

 

  • 69686
    Suggested Answer
    posted

    Hello,

    Once you have opened the context menu and clicked on an option from it, you can use our helper methods to get to the element you want:

    Infragistics.Windows.Utilities.GetDescendantFromName(...) and Infragistics.Windows.Utilities.GetDescendantFromType. For parameter "parent element" you should pass in the element you have opened the context menu on - DataRecordPresenter, CellValuePresenter, etc. so that you search the element tree downwards. You can also use Infragistics.Windows.Utilities.GetAncestorFromName and Infragistics.Windows.Utilities.GetAncestorFromType for the other direction.

    Hope this helps