function PagosTxGrid() {
	this.columns = [
		            {header:"",name:"idContrato",visible:false,width:'300'},
					{header:"",name:"idLista",visible:false,width:'50'},
					{header:"",name:"idCalculoCosto",visible:false,width:'230'},
					{header:"",name:"idTituloCnt",visible:false,width:'230'},
					{header:"Titulo",name:"descTitulo",visible:true,width:'230'},
					{header:"Categoria",name:"categoria",visible:true,width:'230'},
					{header:"Estudio",name:"descEstudio",visible:false,width:'230'},
					{header:"Tipo Titulo",name:"tipoTitulo",visible:false,width:'230'},
					{header:"Mes",name:"month",visible:false,width:'230'},
					{header:"MG",name:"minimo",visible:true,width:'230'},
					{header:"Revenue Share",name:"rsEstudio",visible:true,width:'230'},
					{header:"Client Retail",name:"precio",visible:true,width:'230'},
					{header:"Buys",name:"rentas",visible:true,width:'230'},
					{header:"Total Revenue",name:"costo",visible:true,width:'230'},
					{header:"Acumulado",name:"acumulado",visible:true,width:'230'},
					{header:"SAP",name:"docMaterial",visible:true,customRender : function(item,model,index)
		            	{
							var r ="";
							if(typeof item.docMaterial != 'undefined' && item.docMaterial != null && item.docMaterial!= '')
							{
								r+="<i class='fa fa-check'></i>";
							}
							else
							{
								r+="<i class='fa fa-times'></i>";
							}
							return r;
						}
		            }
				];
	this.init();
};

PagosTxGrid.prototype.paint = function(items) {
	this.grid.setItems(items);
	this.grid.init();
};

PagosTxGrid.prototype.init = function() {
	var me = this;
	this.grid = $("#dyn1").dynTable({
		lazyInit : true,
		local : true,
		prefix : 'pagos',
		root : 'pagos',
		colModel : me.columns,
        edit : false,
        dateFormatIn:"yy-mm-dd",
        dateFormatOut:"mm/dd/yy"
	});
	this.grid.init();
};