Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: Displaying List Items In Grid

$
0
0
I usually just emith the markup I want manually - the more conmplex frameworks like dataTables seem like unnecessary overhead to me.

Here's a snippet of code from the SPArrangeChoices function that shows you how I emit the choices in multiple rows based on the value provided in perRow. It's so easy to do this way that I'm not sure a framework adds much value.
out = "<TR>";
for (i = 0; i < columnOptions.length; i++) {
  out += columnOptions[i];
  // If we've already got perRow columnOptions in the row, close off the row
  if ((i + 1) % opt.perRow === 0) {
    out += "</TR><TR>";
  }
}
out += "</TR>";
M.

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>