I need to be able to tell a GridViewRowItem to reload itself from its DataContext, but the functionality doesn't seem to be available in the current release. To work around this, I use this logic:
This works fine for the standard GridViewRowItem. Unfortunately, my grid also has a hierarchy, and so it contains GridViewExpandableRow items as well - I assumed that the same logic would cause the rows to refresh themselves, however it doesn't!
Ideally I just need to be able to tell a row to refresh itself without having to reload the entire grid. The automatic databinding doesn't work perfectly for this, which is why I just need to tell the row to refresh itself.
Any ideas on how I can achieve what I'm attempting here? I'm not sure whether this is a bug within the GridViewExpandableRow.
object context = theRow.DataContext; |
theRow.DataContext = null; |
theRow.DataContext = context; |
This works fine for the standard GridViewRowItem. Unfortunately, my grid also has a hierarchy, and so it contains GridViewExpandableRow items as well - I assumed that the same logic would cause the rows to refresh themselves, however it doesn't!
Ideally I just need to be able to tell a row to refresh itself without having to reload the entire grid. The automatic databinding doesn't work perfectly for this, which is why I just need to tell the row to refresh itself.
Any ideas on how I can achieve what I'm attempting here? I'm not sure whether this is a bug within the GridViewExpandableRow.