I need to mount a grid (javascript) based on some values extracted from your pivot. It has to be a grid with filters, custom's columns, etc ... what javascript control would you recommend? I have different tests mounted with the Datatables and Syncfusion grids. Do you have any plans to launch a grid with the typical excel filter characteristics, grouping, virtual scrolling, export to excel .....?
Hello Jose,
Thank you for writing.
It seems that you are looking for flat table mode. Please find the demo and the jsfiddle example here - https://www.flexmonster.com/demos/js/flat-table/.
Let us know if everything works fine for you.
Regards,
Dmytro.
Hello Dmytro
I understand that it also works with json. I'm sending you an example of the code I'm testing. I send a query and it returns a json string with which I will mount the grid (flat) but it is not working. I have tried with JSON.parse (data), etc ... but nothing.
Can you help me?
var datos = [{"DIVISION":"B1-GLP",
"PROVINCIA":"BALEARES",
"MUNICIPIO":"MAHON-MAO",
"EMPRESALECTURA":"L006-INCATEMA S.L.",
"CENTROLECTURA":"07-Baleares (1021) - GL",
"TARIFA":"31",
"DESCRIPCION UBIC CONT":"BATERÍA",
"SIT SUM":"02",
"SITUACION_SECTOR_SUMINISTRO":"ACTIVO CONTRATADO",
"SITUACION_SUMINISTRO":"EN SERVICIO",
"SOCIEDAD":"1049 - GAS NATURAL REDES GLP, S.A.",
"COD POSTAL":"07701",
"COMERCIALIZADORA":"SIN DATOS",
"LECT ESP":0,
"PARIDAD":"IMPAR",
"LOTE":"07103",
"T5":0,
"T6":0,
"TIPO LECTURA RECIBIDA":"REAL",
"TIPO LECTURA FACILITADA":"",
"TIPO LECTURA FACTURADA":"REAL",
"ULTIMA ANOMALIA DE INSTALACION GENERADA":"",
"ULTIMA ANOMALIA DE LECTURA GENERADA":"",
"TIPO FACTURA":"AUTOMÁTICA",
"INDICADOR DESVIO A PREVIA":"",
"INDICADOR MARCA ADELANTADA":"",
"SALDO MARCA ADELANTADA":0,
"CONS ACUM ACT":0,
"CONS ACUM ANT":51,
"CAPACIDAD CONTADOR":6,
"MARCA CONTADOR":"AC",
"PROPIEDAD CONTADOR":2,
"TIPO CONTADOR":"G-4",
"PRESION CONTAJE PS":"150",
"AÑO FABRICACION CONTADOR":2002}]
new Flexmonster({
container: "#pivot-container",
componentFolder: "https://cdn.flexmonster.com/2.4/",
report: {
dataSource: {
dataSourceType: "json",
filename: datos
},
options: {
grid: {
type: "flat"
},
configuratorActive: false
},
slice: {
columns: [{
uniqueName: "DIVISON"
}, {
uniqueName: "PROVINCIA"
}, {
uniqueName: "MUNICIPIO"
}, {
uniqueName: "TARIFA"
}, {
uniqueName: "LOTE"
}]
}
},
width: "100%",
height: 370
});
Sorry. I had the dataSource object (filename-> data) wrong.
I have changed it and in the jsfiddle code it works but in my application it does not (the same code).
Can you indicate that it does not show row 2 (count)?
The problem with the control I have when it is included in a tab-pane. I explain. I have two tabs, in the first I add the pivot (perfect) and the second one, for the moment empty. When I execute a click on a cell I call a function and declare and complete another flat type pivot. The latter if I have it outside of tab-pane (in another panel, for example) works perfectly but inside tab-pane it does not work.
Keep investigating.
Hello Jose,
Thank you for your questions. It seems that you faced the situation when the pivot cannot be drawn if it is invisible. In such case, pivot expects to be extra refreshed. It can be done with the refresh()
API call. Please find more information in our documentation - https://www.flexmonster.com/api/refresh/. Also, we have the example when using pivot with tabs - http://jsfiddle.net/flexmonster/t1L42hr0/.
Please let us know if the information above was helpful for you.
Regards,
Dmytro.