Currently, I am utilizing the ASP.NET MVC framework to develop an application. My goal is to showcase a table on a webpage that seamlessly transitions into a panel view for each individual record as depicted in the images below.
For wider browser widths:
https://i.sstatic.net/DTHor.png
For narrower browser widths:
https://i.sstatic.net/co4Lb.png
Here is the code snippet I have implemented to achieve this functionality. It relies on Bootstrap's rows, columns, and display classes to control the visibility of HTML elements based on the viewport width.
However, I have encountered a difficulty with my current approach. As the table requires additional columns, managing the layout becomes increasingly complex. Due to Bootstrap's 12-column grid system, I find myself manually adjusting the column widths at various breakpoints and even dividing columns further to maintain spacing symmetry.
My inquiry is whether there exists a simpler code solution or perhaps a plugin that automates the distribution of column space akin to how the traditional <table>
tag operates?
While one alternative could involve maintaining separate designs and toggling their visibility using Bootstrap's display classes, I am hesitant about this option as it necessitates duplicating HTML structures for the same dataset.