Author Topic: load state does not work  (Read 71 times)

lgonzakratos

  • Newbie
  • *
  • Posts: 1
    • View Profile
load state does not work
« on: January 20, 2023, 08:48:27 pm »
hello friend, actually i have a problem, I have a variable where I store the grouping, when i use loadState, the state does not load and load by default

i have this

configuracionGrid='{"colModel":[{"dataIndx":"Accion","width":100,"filter":{},"hidden":false},{"dataIndx":"IdCollaboration","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"Cod_Item","width":100,"filter":{"crules":[{"condition":"begin"}]}},{"dataIndx":"Desc_Item","width":100,"filter":{"crules":[{"condition":"begin"}]}},{"dataIndx":"Cod_UEN_LEN","width":100,"filter":{"crules":[{"condition":"begin"}]}},{"dataIndx":"Desc_UEN_LEN","width":100,"filter":{"crules":[{"condition":"begin"}]}},{"dataIndx":"Cod_Categoria","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"Desc_Categoria","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"Cod_Familia","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"Desc_Familia","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"Cod_UdVenta","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"Desc_UdVenta","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"Cod_Marca","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"Desc_Marca","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"Cod_Cliente","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"Desc_Cliente","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"Cod_PuntoEntrega","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"Cod_Pais","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"Desc_Pais","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"Cod_Region","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"Desc_Region","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"Cod_Canal","width":100,"filter":{"crules":[{"condition":"begin"}]}},{"dataIndx":"Desc_Canal","width":100,"filter":{"crules":[{"condition":"begin"}]}},{"dataIndx":"Cod_Gerente","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"Desc_Gerente","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"Cod_Mercado","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"Desc_Mercado","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"Cod_Departamento","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"Desc_Departamento","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"CollaborationGroupDesc","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"ConsecutivoEvento","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"ConsecutivoTipoEvento","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"TipoDemanda","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"NombreEvento","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"QueryType","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"PaintRow","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"FrozenMonths","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"FixedDates","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"IdCollaborationGroup","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"pq_close","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"IdNumerico","width":100,"filter":{"crules":[{"condition":"begin"}]},"hidden":true},{"dataIndx":"Enero 2022 0.0","width":100,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Febrero 2022 0.0","width":100,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Marzo 2022 0.0","width":100,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Abril 2022 0.0","width":100,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Mayo 2022 0.0","width":100,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Junio 2022 0.0","width":100,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Julio 2022 0.0","width":100,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Agosto 2022 0.0","width":100,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Septiembre 2022 0.0","width":100,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Octubre 2022 0.0","width":100,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Noviembre 2022 0.0","width":100,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Diciembre 2022 0.0","width":100,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Promedio12Meses","width":146,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Enero 2023 0.0","width":100,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Febrero 2023 0.0","width":100,"filter":{"crules":[{"condition":"gte"}]},"hidden":false},{"dataIndx":"W-202302_1","width":100,"hidden":true},{"dataIndx":"W-202302_2","width":100,"hidden":true},{"dataIndx":"W-202302_3","width":100,"hidden":true},{"dataIndx":"W-202302_4","width":100,"hidden":true},{"dataIndx":"W-202302_5","width":100,"hidden":true},{"dataIndx":"Marzo 2023 0.0","width":100,"filter":{"crules":[{"condition":"gte"}]},"hidden":false},{"dataIndx":"W-202303_1","width":100,"hidden":true},{"dataIndx":"W-202303_2","width":100,"hidden":true},{"dataIndx":"W-202303_3","width":100,"hidden":true},{"dataIndx":"W-202303_4","width":100,"hidden":true},{"dataIndx":"W-202303_5","width":100,"hidden":true},{"dataIndx":"Abril 2023 0.0","width":100,"filter":{"crules":[{"condition":"gte"}]},"hidden":false},{"dataIndx":"W-202304_1","width":100,"hidden":true},{"dataIndx":"W-202304_2","width":100,"hidden":true},{"dataIndx":"W-202304_3","width":100,"hidden":true},{"dataIndx":"W-202304_4","width":100,"hidden":true},{"dataIndx":"W-202304_5","width":100,"hidden":true},{"dataIndx":"Mayo 2023 0.0","width":100,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Junio 2023 0.0","width":100,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Julio 2023 0.0","width":100,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Agosto 2023 0.0","width":100,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Septiembre 2023 0.0","width":100,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Octubre 2023 0.0","width":100,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Noviembre 2023 0.0","width":100,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Diciembre 2023 0.0","width":100,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Enero 2024 0.0","width":100,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Promedio6Meses","width":100,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Promedio3Meses","width":100,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Suma12Meses","width":100,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Suma6Meses","width":100,"filter":{"crules":[{"condition":"gte"}]}},{"dataIndx":"Suma3Meses","width":100,"filter":{"crules":[{"condition":"gte"}]}}],"datestamp":1674221709106,"height":750,"width":"auto","freezeRows":0,"freezeCols":0,"groupModel":{"dataIndx":[],"collapsed":[]},"pageModel":{"curPage":1,"rPP":10},"sortModel":{"sorter":[]}}'

$("#collaborationTable").pqGrid('loadState', { state: configuracionGrid, refresh: false });


i have columns collapsible

thanks

have a nice day

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 5795
    • View Profile
Re: load state does not work
« Reply #1 on: January 24, 2023, 06:43:53 am »
How have you initialized the grid?

It would be great if you share complete test case on jsfiddle or stackblitz.