First you have to set the separator style to none, so that you can define gaps yourself, you can set this in the table' tss, I would also not use the grouped style as this further constrains your styling:
"#tbl_ElectionList":{
top:'40',
height:Ti.UI.SIZE,
left:'10',
right:'10',
separatorStyle : Titanium.UI.iPhone.TableViewSeparatorStyle.NONE,
borderColor:'green'
}
Try adding rows that way and you should see the gaps
var containerrow = Titanium.UI.createTableViewRow({
height:(Ti.Platform.osname == 'ipad')?'280':'140',
width: Ti.UI.FILL
});
// This innerView will be set in the middle of the row
// It will hold your main row content
// We make it smaller than the row to give padding
var innerView = Ti.UI.createView({
width : '80%',
height : '80%',
color:'red',
borderRadius:4,
borderWidth:1,
borderColor:'green'
});
containerrow.add(innerView);
// Add to the table data
data.push(containerrow);
Then of course set the data as you did before.