I am working on an asp.net mvc-4 web application and I am using bootstrap 2.0. Currently I am heavily using the asp.net mvc web grid, in almost every controller. Now it is a great way to sort, page and view info with minimal code written. But the only issue I am facing is when users access the web grid on mobile devices. Where the web grid columns will be very thin and its data will be almost impossible to read.
Now I find two approaches to follow for improving the webgrid interface on mobile devices:-
One approach to use Style:”hidden-phone” on the less important column as follows, so these columns will be hidden on mobile devices, while the most important column will be display and occupy the freed area:-
var gridcolumns = new List<WebGridColumn>(); gridcolumns.Add(new WebGridColumn() { ColumnName = "OrderID", Header = "", Style = "hidden-phone", CanSort = false,
While the second approach is to use some css styles to change the tale style to be block instead of row by following this approach link
Now from my own experience the first approach is more user friendly since the user can still view the webgrid as table, with the most important columns. While the second approach have the advantage that all the info will be presented (nothing is going to be hidden), but having a webgrid’s table rows being shown as a block will allow the users to view max of two blocks without having to scroll down/up.
So generally speaking which approach is better to follow? to hide some columns and gain a better user experience, or to view all info as a block but have less user experience ?