Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1390
Remote sorting and grouping using sortUrlKey
posted

Hi, I'm trying to use the remote sorting and grouping features.

According to the forums I have set the urlSort key to the odata URI protocol.

 

{
					name: 'Sorting',
					type: "remote",
					sortUrlKey: "$orderby",
					sortUrlKeyAscValue: "asc", 
					sortUrlKeyDescValue: "desc",
					columnSettings: [						
						{columnKey: "IsNew", allowSorting: false}						
					],
				},
				{
					name: "GroupBy",					
					type: "remote",													
					allowGrouping: true
				}

But it seems like the feature setting gets ignored.

 The request query still comes out as

 

 Please can u assist.

Thanks in advance.

 

 

 

Parents
  • 24671
    posted

    Hi,

    the grid uses OData encoding for all of its features by default, if you don't set the keys explicitly. so basically you don't need to change any of the options. Let me know if this helps

    Thanks,

    Angel

Reply
  • 1390
    posted in reply to Alexander Todorov

    Hi Angel, I did try to the default configuration before setting the keys explicitly. But still has the same effect on the orderby query parameters.

    {
    	name: 'Sorting',
    	type: "remote",
    	columnSettings: [						
    		{columnKey: "IsNew", allowSorting: false}
    	],
    },
    {
    	name: "GroupBy",					
    	type: "remote"					
    },

     

     The complete grid initialization script:

    $("#table").igGrid({
    	dataSource			: dSource,						
    	autoGenerateColumns	: false,
    	alternateRowStyles	: true,
    	showHeader			: true,
    	showFooter			: false,
    	jQueryTemplating	: true,					
    	rowTemplate			: $("#rowTemplate").html(),							
    	columns: [
    		{
    			headerText: "",
    			key: "IsNew",			
    			dataType: "bool",
    			width: 28 
    		},
    		{
    			headerText: "Routed",
    			key: "HasBeenRouted",			
    			dataType: "bool",
    			width: 28,
    			hidden:true 
    		},
    		{
    			headerText: "Escalated",
    			key: "HasBeenEscalated",			
    			dataType: "bool",
    			width: 28,
    			hidden:true 
    		},				
    		{
    			headerText: "Description", 
    			key: "DisplayName", 					
    			dataType: "string",
    			width: 130
    		},
    		{
    			headerText: "No", 
    			key: "Id", 					
    			dataType: "number", 
    			width: 25 
    		},
    		{
    			headerText: "Group",
    			key: "ProcessGroupId",					
    			width: 50
    		},
    		{
    			headerText: "From",
    			key: "Originator",					
    			width: 70
    		},
    		{
    			headerText: "Participant",
    			key: "CurrentParticipant",					
    			width: 70
    		},
    		{ 
    			headerText: "Received", 
    			key: "ActivationDate",					
    			dataType: "date", 
    			format: "dateTime",	
    			width: 45 			
    		},
    		{
    			headerText: "Due",
    			key: "DueDate",
    			dataType: "date",
    			format: "dateTime",	
    			width: 45
    		}
    	],			
    	features: [
    		{
    			name: 'Paging',
    			pageSize: 25,
    			recordCountKey: "Total",
    			showFirstLastPages : true,
    			showPagerRecordsLabel: true,
    			showPageSizeDropDown: false,
    			showPrevNextPages: true
    		},
    		{
    			name: 'Sorting',
    			type: "remote",
    			columnSettings: [						
    				{columnKey: "IsNew", allowSorting: false}
    			],
    		},
    		{
    			name: "GroupBy",					
    			type: "remote"					
    		},
    		{
    			name: "Filtering",
    			mode: 'simple',
    			allowFiltering: true,
    			caseSensitive: false,					
    			columnSettings: [						
    				{columnKey: "IsNew", allowFiltering: false}						
    			],
    			filterDropDownItemIcons: true,					
    		}				
    	]
    });

    Thanks 

     

     

     

     

     

     

Children