Hi all
My records contain unbound cells which display data based on on a presenter style and a converter. For these cells, the grid is not aware if the underlying data changes - which results in a faulty representation of my data. What I'm looking for is a way to refresh a record according to the functionality provided by WinGrid. I'm pretty sure there must be something, but I couldn't figure out where...
Thanks for your advice
Philipp
ps: I think this problem is one of the shortcomings of the BindingPath string of an unbound field. It sure would be nice if we just could use a real binding instead:<igDP:UnboundField Value="{Binding ...}" />
Hi Naveen
I see one problem with this approach though. Here is how I am using this.
if(e.Cell.Field.Name == "Fee")
{
DataRowView dv = e.Cell.Record.DataItem as DataRowView;
dv[
"Rate"] = Convert.ToDouble(e.Cell.Value) * .01;
e.Cell.Record.Visibility = Visibility.Collapsed;
e.Cell.DataPresenter.UpdateLayout();
e.Cell.Record.Visibility = Visibility.Visible;
}
After entering the value in the cell & hiting the Tab.. if the next column is a Editable it will not
go to edit mode & the horizontal scroll bar moves to the left.
Any idea how to solve these issues
Thanks
-Kiran
Thanks for your help. This worked for me
Hi, I was ably to solve the refresh records from using below code.
public static void RedrawRecord(Record record_) { if (record_ != null) { // Force Xam Grid to redraw the record so that all syles can be re-applied. record_.Visibility = Visibility.Collapsed; var presenter = DataRecordPresenter.FromRecord(record_); if (presenter != null) { presenter.UpdateLayout(); } record_.Visibility = Visibility.Visible; } }
Thanks,
Naveen
Hi
Is there any solution for refresh problem. Even i have the same problem. I bind DataView (DataTable) to grid & on editing one column I need to re-calculate the value of other 2 columns. I am doing this at the DataRow level. So changes are not reflecting unless I go click on the other columns.
Hi Can some one from infragistics comment on this? In addition to what I was doing earlier, I tried lot of options (below) but none causes the converter (which I am using to return color based on cell value) to be called. I was working with 9.1 builds. I am using latest sevice release 2010.2.20102.2045
var presenter = DataRecordPresenter.FromRecord(dataRecord);
var drCellArea = presenter.FindFirstChildByType<DataRecordCellArea>(); presenter.Visibility = Visibility.Collapsed; presenter.Visibility = Visibility.Visible; presenter.UpdateLayout(); presenter.InvalidateVisual(); drCellArea.Visibility = Visibility.Collapsed; drCellArea.Visibility = Visibility.Visible; drCellArea.UpdateLayout(); drCellArea.InvalidateVisual(); drCellArea.InvalidateProperty(Control.BackgroundProperty); _grid.Visibility = Visibility.Collapsed; _grid.Visibility = Visibility.Visible; _grid.UpdateLayout(); _grid.InvalidateVisual();