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
1310
How to get the selected Cell?
posted

Hello!

I am trying to know which is the cell that has been changed. I have binded a class that will populate each row at once. Each column is a grouped Column that has two columns inside:

Example:

Column1: January

"SubColumns of January": Money Expended | Money Earned

Column2: February

"SubColumns of February": Money Expended | Money Earned

and so on...

I have binded my xamGrid active item to my ViewModel SelectedItem

ActiveItem="{Binding SelectedItem,Mode=TwoWay}"


but I get all the row back in my selectedItem. I can't know the cell that has been
edited. Even If I put a Tag in each column, I get the event in my code behind,
the data in my sender argument that has a Tag property is shown as null.

So, any other way of knowing which cell has been changed?

Thank you

  • 1310
    Verified Answer
    posted

    Found a way, even if I continue thinking that there is a bug here... Anyway, in any eventHandler we can go through the grid and we will get a Tag with the real value in the Active Cell.

    I mean there is a bug with this, because in the args of any activeCell eventHandler, the tag and everything that is accessible is null or empty.

    var a = sender as Infragistics.Controls.Grids.XamGrid;
    var b = a.ActiveCell.Column.Tag;