You would have to slice the elements and make new div elements to contain the sliced elements. Below is a code example. I'm not aware of any more simpler method to do this.
$(".items").each(function()
{
var rowDiv = document.createElement("div");
$(rowDiv).addClass("row");
for(i=0; i< $(this).find("> .boxgrid").length ; i+= 3)
{
$(rowDiv).append( $(this).find("> .boxgrid").slice(i, i+3).clone() );
$(this).append(rowDiv);
rowDiv = document.createElement("div");
$(rowDiv).addClass("row");
}
$(this).find("> .boxgrid").remove();//Remove all the immediate boxgrid child elements.
});