Hi,
I have a bound GridView with calculated row totals, when we edit a cell and mouse click out the cell saves and total calculation works fine.
When we edit a cell and 'enter' out the total is calculated but the grid becomes sort of read only.
I say sort of because the only key that any cell will accept is the space key, letters/numbers are being blocked.
The code behind I am using to fire the row total update is here, the actual viewModel is simply do a linqesque query across some of the columns (this works fine).
I had to add boolean called refresh into the mix because otherwise when I called Rebind() inside the CellEditEnded it went into a infinite loop, so refresh just forces the rebind to happen once each edit.
private void dgDisplay_CellEditEnded(object sender, GridViewCellEditEndedEventArgs e)
{
refresh = true;
_viewModel.UpdateAllowedDisplayunits();
this.dgProducts.Rebind();
dgProducts.IsEnabled = true;
}
private void dgProducts_SelectedCellsChanged(object sender, Telerik.Windows.Controls.GridView.GridViewSelectedCellsChangedEventArgs e)
{
refresh = false;
}
This all works if you click out of the edited cell, but as soon as you hit the enter key it blocks key inputs to the grid cell, except for the space key which it allows?
Any ideas would be gratefully accepted
craig
I have a bound GridView with calculated row totals, when we edit a cell and mouse click out the cell saves and total calculation works fine.
When we edit a cell and 'enter' out the total is calculated but the grid becomes sort of read only.
I say sort of because the only key that any cell will accept is the space key, letters/numbers are being blocked.
The code behind I am using to fire the row total update is here, the actual viewModel is simply do a linqesque query across some of the columns (this works fine).
I had to add boolean called refresh into the mix because otherwise when I called Rebind() inside the CellEditEnded it went into a infinite loop, so refresh just forces the rebind to happen once each edit.
private void dgDisplay_CellEditEnded(object sender, GridViewCellEditEndedEventArgs e)
{
refresh = true;
_viewModel.UpdateAllowedDisplayunits();
this.dgProducts.Rebind();
dgProducts.IsEnabled = true;
}
private void dgProducts_SelectedCellsChanged(object sender, Telerik.Windows.Controls.GridView.GridViewSelectedCellsChangedEventArgs e)
{
refresh = false;
}
This all works if you click out of the edited cell, but as soon as you hit the enter key it blocks key inputs to the grid cell, except for the space key which it allows?
Any ideas would be gratefully accepted
craig