jQWidgets Forums
jQuery UI Widgets › Forums › Grid › How to implement custom sorting with custom grouping
Tagged: jqxGrid ;
This topic contains 3 replies, has 2 voices, and was last updated by Hristo 4 years, 2 months ago.
-
Author
-
Hi JQWidgets Team,
We have implement Custom sorting (server side) and also implement custom Grouping (server side) and also expand grouping data with with server side.
After implement this We have Facing many issue like :Case 1-
Group By any column then Expand Group any group And Sort by any coumn then Grid is not sorting properly.
Case 2-
Sort by any column then Group By any coulmn then Expand any Group – Its also not working properly.
Case 3-
Sort by any column then Filter by any column and then Group By any column and then Expand any Group- Its also not working properly.
Case 4-
Filter by any coumn then Sort by any column and then Group By with any column then Expand Group – Its also not working properly.Note:
We have Implemented custom method of Grid Like:1)- For Grouping:
groupsrenderer: groupsrenderer
2)-For Sorting:
var source =
{
localdata: data,
sort: searchcustomsortfunc,
datatype: “Array”,
}3)- For Paging:
pagerrenderer: pagerrenderer
4)- We have also used Property like:
editmode: ‘programmatic’,
selectionmode: ‘multiplecellsadvanced’,
showsortmenuitems: true,
columns: Gridcolumns,
5)- We have also used state of Grid.Please check and do the needful asap and please also suggest how to implement grouping in sort: searchcustomsortfunc.
Thanks in Advance.
Thanks and Regards:
Ajay K.Hello Ajay K.,
I would like to ask you for more details.
About the grouping, I would like to mention that there is no Server-Side grouping feature for jQWidgets, unfortunately.
But if you implement correctly jqxGrid with the other features then you could group by desired columns.
I mean that you could use an array with the columns that are used to group by in the jqxGrid and after the update to return grouping.
Also, I would like to suggest you look at this tutorial:
https://www.jqwidgets.com/jquery-widgets-documentation/documentation/phpintegration/php-server-side-grid-paging-and-filtering.htm?search=
This one could be useful, too:
https://www.jqwidgets.com/jquery-widgets-documentation/documentation/phpintegration/php-server-side-grid-paging-and-sorting.htm?search=Best Regards,
Hristo HristovjQWidgets team
https://www.jqwidgets.comHi Hristo,
I have alredy Implements these as You suggest me tutorial’s link and custom sorting without grouping also working and Custom groping also working without Sorting.
Actually , in jqxgrid we have implemented server side grouping that means when we group
with any column in jqxgrid we hit servce and get data according to page size and bind the grid.We have implemneted sorting also in server side that means when we sort with any column in jqxgrid we get
the data from database after sorting by partcular column from database and bind the grid according to page size.So the question is :-
1:-when we group by any column in jqxgrid we get the data from server and bind the grid.
For every group lets suppose there are 10 groups created we get only one row to bind the groups .2:- Now when we expand any group then again we hit server to get the data for that particular group which we are going to expand
After getting the data we add the rows to that particular group and expand that group.3:- Now the requirement is to sort the expanded group , when we click on sorting in any column we again hit server to get the data in sorted manner from database
and bind the grid again with maintaing previous states .
But when we click on sorting the gropus are reordered , please guide us how to achieve this.Hello Ajay K.,
I am not sure what you mean by this you implement the Server-Side grouping because by default there is no such option for the jqxGrid.
If you use custom logic then it is possible to achieve an inappropriate result.
In my previous post, I suggest that you could try to use Server-Side sorting and after that when it is finished to add the previously added groups.
Also, you could save the groups that are expanded and show them again at the end of the previous operations.
Please, provide us with one simple example that demonstrates your case.You could try one another our product – Smart HTML Elements.
It provides a Server-Side grouping which you could try with this demo.Best Regards,
Hristo HristovjQWidgets team
https://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.