Refactoring DataGrid.