Quantcast

dojox.grid.EnhancedGrid + plugins.NestedSorting not work

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

dojox.grid.EnhancedGrid + plugins.NestedSorting not work

shailesh savani
This post was updated on .
Dear All i try to nested sorting of client side not a server side, but every time request fair and fetch new record, i want to sort my existing record of grid, if any one know this type of sorting PLEASE help me................ My code structure -> -------------------------------------------------------- <script type="text/javascript"> dojo.require("dojox.grid.EnhancedGrid"); dojo.require("dojo.data.ItemFileWriteStore"); dojo.require("dojo.parser"); dojo.require("dojox.grid.enhanced.plugins.Filter"); dojo.require("dojox.grid.enhanced.plugins.exporter.CSVWriter"); dojo.require("dojox.grid.enhanced.plugins.Printer"); dojo.require("dojox.grid.enhanced.plugins.Cookie"); dojo.require("dojox.grid.enhanced.plugins.IndirectSelection"); dojo.require("dojox.grid.enhanced.plugins.NestedSorting"); dojo.require("dojox.grid.enhanced.plugins.Selector"); dojo.require("dojox.grid.enhanced.plugins.Menu"); dojo.require("dojox.grid.enhanced.plugins.DnD"); dojo.require("dojox.grid.enhanced.plugins.Search"); dojo.require("dojox.grid.enhanced.plugins.CellMerge"); dojo.require("dojox.grid.enhanced.plugins.Pagination"); dojo.require('doh.runner'); dojo.require("dojo.parser"); var gridLayout = [{ cells: [ new dojox.grid.cells.RowIndex( { field: "CountryID", name:"CountryID", datatype:"number", width: 0,styles: "display:none;"}), { field: "SrNo", name:"SrNo", datatype:"number", width: 2,styles: "text-align: center;font-weight:bold;color:blue;"}, { field: "CountryCode2Char", name:"CountryCode2Char", datatype:"string", width: 5}, { field: "CountryName",filterable: false, name:"CountryName", datatype:"string", width: 15}, { field: "CountryDialingCode", name:"CountryDialingCode", datatype:"number", width: 5}, { field: "NationalNumberLength", name:"NationalNumberLength", datatype:"string", width: 5}, { field: "UpdateBy", name:"UpdateBy", datatype:"string", width: 13}, { field: "UpdateTime", name:"UpdateTime", datatype:"string", width: 15}, { field: "CountryID", name:"View",datatype:"number", formatter: hrefViewFormatter, width: 3,styles: "text-align: center;"}, { field: "CountryID", name:"Edit", datatype:"number",formatter: hrefEditFormatter, width: 3,styles: "text-align: center;"}, { field: "CountryID", name:"Delete", datatype:"number", formatter: hrefDeleteFormatter, width: 3,styles: "text-align: center;"} ] }]; var pagePlugins = { pagination: { pageSizes: ["10","25","50","100","All"], // Array, custom the items per page button itemTitle: "Rows", // String, custom the item' title of description description: "30%", // boolean, custom whether or not the description will be displayed sizeSwitch: "260px", // boolean, custom whether or not the page size switch will be displayed pageStepper: true, // boolean, custom whether or not the page step will be displayed gotoButton: true, // boolean, custom whether or not the goto page button will be displayed maxPageStep: 5, // Integer, custom how many page step will be displayed position: "both", // String, custom the position of the pagination bar - top, bottom, both defaultPage: 2, //which page will be displayed by default defaultPageSize: "10", autoWidth: true, autoHeight: true, rowSelector: "20px" }, nestedSorting: true, indirectSelection: false, }; var storeQRS = new dojox.data.QueryReadStore({url:"http://localhost:8080/AdminPortal1/public/Country/Country/grid/", requestMethod:"post",clientSorting:"true"}); //var storeQRS = new dojox.data.QueryReadStore({url:"http://localhost:8080/AdminPortal1/public/Country/Country/grid/p1/0/p2/200", requestMethod:"post"}); //var storeJRS = new dojox.data.JsonRestStore({target:"http://localhost:8080/AdminPortal1/public/Country/Country/grid/"}); function showDlg(CountryID,Name) { var DialogView = new dijit.Dialog({title:Name,content: CountryID , style: "width:600px;height:auto;align:center;background:#CCCCCC !important;" , onExecute:removeThis, onCancel:removeThis }); DialogView.show(); } function removeThis() { this.destroyRecursive(); } function hrefViewFormatter(CountryID) { return "<a href=\"#\" onClick=\"showDlg('"+CountryID+"','View');\"><image src='http://192.168.2.9:1001/template/theam/bridge2call/images/grid/icon_22x22_info.png' /></a>"; }; function hrefEditFormatter(CountryID) { return "<a href=\"#\" onClick=\"showDlg('"+CountryID+"','Edit');\"><image src='http://192.168.2.9:1001/template/theam/bridge2call/images/grid/icon_22x22_edit.png' /></a>"; }; function hrefDeleteFormatter(CountryID) { return "<a href=\"#\" onClick=\"showDlg('"+CountryID+"','Delete');\"><image src='http://192.168.2.9:1001/template/theam/bridge2call/images/grid/icon_22x22_delete.png' /></a>"; }; </script>
--------------------------------------------------------
Best Regards
shailesh savani
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: dojox.grid.EnhancedGrid + plugins.NestedSorting not work

zhuxw
hi, it would be much easier to help if you could format the mail better and explain more on this statement: "every time request fair and fetch new record, i want to sort my existing record of grid". ;-)

--------
oliver
Best Regards
-------------
Oliver
Loading...