Is there any way to dynamically open/close the groupings in a listgrid?
Announcement
Collapse
No announcement yet.
X
-
When changing the data of the listgrid, groupStartOpen property is not retained. Please verify that this is a bug - Click the button to change data of listgrid in the sample
Code:var testData = [ {pk:0, orderID:8805, itemDescription:"Anti Virus Suite", category:"Software", shipDate:new Date(2009,10,20), quantity:2 , unitPrice:50 }, {pk:1, orderID:4833, itemDescription:"USB Ergonomic Keyboard", category:"Hardware", shipDate:new Date(2009,10,13), quantity:1 , unitPrice:99.99 }, {pk:2, orderID:9551, itemDescription:"Lumbar Support Cushion", category:"Hardware", shipDate:new Date(2010,1,2), quantity:1 , unitPrice:75 }, {pk:3, orderID:954, itemDescription:"USB Keyboard", category:"Hardware", shipDate:new Date(2009,10,20), quantity:12 , unitPrice:34.99 }, {pk:4, orderID:616, itemDescription:"Consulting Services", category:"Services", shipDate:new Date(2009,10,10), quantity:40 , unitPrice:100 }, {pk:5, orderID:8357, itemDescription:"Office Application Suite", category:"Software", shipDate:new Date(2010,2,5), quantity:14 , unitPrice:30 }, {pk:6, orderID:4582, itemDescription:"Anti Virus Suite", category:"Software", shipDate:new Date(2010,1,20), quantity:22 , unitPrice:50 }, {pk:7, orderID:9373, itemDescription:"On-site Training", category:"Services", shipDate:new Date(2009,10,20), quantity:20 , unitPrice:100 }, {pk:8, orderID:9311, itemDescription:"Software Development Kit", category:"Software", shipDate:new Date(2009,10,10), quantity:8 , unitPrice:249.99 }, {pk:9, orderID:7806, itemDescription:"15 inch flat panel monitor", category:"Hardware", shipDate:new Date(2009,11,12), quantity:4 , unitPrice:300 } ]; var testData2=[ {pk:0, orderID:8620, itemDescription:"18 inch flat panel monitor", category:"Other", shipDate:new Date(2009,11,11), quantity:2 , unitPrice:375 }, {pk:1, orderID:629, itemDescription:"Office Productivity Suite", category:"Other", shipDate:new Date(2009,12,10), quantity:15 , unitPrice:64.99 }, {pk:2, orderID:1264, itemDescription:"Office Productivity Suite", category:"Other", shipDate:new Date(2009,12,20), quantity:2 , unitPrice:64.99 }, {pk:3, orderID:7100, itemDescription:"USB Ergonomic Keyboard", category:"Other", shipDate:new Date(2009,10,20), quantity:6 , unitPrice:99.99 }, {pk:4, orderID:9647, itemDescription:"Consulting Services", category:"Other", shipDate:new Date(2009,12,21), quantity:10 , unitPrice:100 }, {pk:5, orderID:8468, itemDescription:"USB Optical Mouse", category:"Other", shipDate:new Date(2009,10,10), quantity:5 , unitPrice:29.99 }, {pk:6, orderID:9496, itemDescription:"Off-site Training", category:"None", shipDate:new Date(2010,1,1), quantity:35 , unitPrice:80 }, {pk:7, orderID:5124, itemDescription:"USB Stereo Headset", category:"Other", shipDate:new Date(2009,10,20), quantity:1 , unitPrice:69.99 }, {pk:8, orderID:1799, itemDescription:"Office Application Suite", category:"Other", shipDate:new Date(2009,11,2), quantity:22 , unitPrice:30 }, {pk:9, orderID:7020, itemDescription:"Consulting Services", category:"None", shipDate:new Date(2009,12,20), quantity:100 , unitPrice:80 }]; isc.ListGrid.create({ ID: "companyList", width:600, height: 300, alternateRecordStyles:true, autoFetchData:true, data: testData, groupByField:"category", groupStartOpen:"all", canEdit:true, editEvent:"click", fields:[ {name:"orderID"}, {name:"itemDescription"}, {name:"category"}, {name:"shipDate"}, {name:"quantity"}, {name:"unitPrice"} ] }); isc.Button.create({ title: "click", width: 150, left: 700, top: 150, click: function() { companyList.setData(testData2); } });
Comment
-
I am still getting some cases where the groupstart property is not retained. I cannot reproduce as a standalone. We have a sort of "manual" paging implemented. I am not sure what to look at to debug in this case. It usually loses groupstart when I go back to a previous set of data. Do you have any suggestions as to what could be happening? What if I provide all the dsrequest/response up to where the groupstart is lost?
Comment
-
It's unlikely to be anything related to specific DSRequests/DSResponses unless the responses are actually invalid, it's more likely to do with a weird sequence of calls. From code inspection, no particular scenario suggests itself - every time we re-create the groupTree, the groupStartOpen property is applied, it's unconditional.
Sorry, but we're probably not going to be able to provide any more help than that until you get a reproducible case.
Comment
Comment