Home Forums WPF controls Xceed DataGrid for WPF Update columns while tabbing through rows

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #26436 |

    I have a grid with calculated columns that update when a user hits the enter key or changes rows. I would like these calculated columns to update as the user tabs through the edit columns.

    Is there any way to trigger an event to recalculate these columns as you tab through a row?

    Imported from legacy forums. Posted by Ben (had 2388 views)

    User (Old forums)
    Member
    Post count: 23064

    What are the calculated columns data source.

    Sounds like the Calculated column value is associated to the CurrentColumn of the Grid?

    Please Clarify a lilttle more

    Imported from legacy forums. Posted by MiddleTommy (had 344 views)

    User (Old forums)
    Member
    Post count: 23064

    If that is the case: just a suggestion
    I would put the Calculated values as a property of the rows data source(your data item)
    Have your Datasource implement IPropertyChanged

    then an easy way is:
    catch the PropertyChanged event of the Grid in code behind

    void Grid_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
    {
    if(e.PropertyName == “CurrentColumn”)
    {
    //check which column is selected then set the computed new value
    //computed column property-set method should raise the PropertyChangedEvent

    }
    }
    //then the grid should update the column value all by itself

    Imported from legacy forums. Posted by MiddleTommy (had 3480 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.