Grid Default Grouping after regrouping - extjs4

I have a Grid with Grouping feature. I have set the "groupField" config to the column on which I want grouping. So when the page get load , Grid shows the grouped columns.and it is working fine.
for my requirement, I have not added the column [on which I am doing grouping] to the Grid. So the Grid doesn't show the Grouped column.
so the scenario is like.
if eg.
Grid with 5 column [Name, Email,Status,address,city]
currently displayed column= 4 [Name,Email,address,city]
Grouped column= 1 [status]
Now My Query is, out 4 [currently displayed ] column if, I changed the grouping to "city", [remember, on page load we have grouped Grid data, since I have set "groupField=status" in store] how will I go back for the default grouping [i.e. Grouping on status column]?
Note: The column "status" is not displayed to Grid, there is no header option from which I can change the Grouping.
Hope I am able to explain well here.

You can create button which will turn on grouping by status like in Ext JS example (there is only clearing, but you can do grouping as well).
Another possibility is to create handler on beforeload event in store, and check if there is any grouping turned on - if not turn on grouping by status. Then you can't turn off grouping.

Related

FileMaker 17 Sub-summary value

Edited:
Let me try to explain more clearly. I wrote the earlier message in haste:
I have a sub-summary part which is sorted by the parent table's ID field. In this part, i have placed a summary field from the child table ( on which the layout is based ). This summary field is a running total of a number field in the child table , with restart checked. When this field is placed in the sub-summary part, it summarizes the values of all the records below it. Which is fine. What i want is to show that summarized value in each of the records just below the sub-summary. So for instance if the summary field shows a total of 1,000, then i want to show that 1,000 in each child record below in the layout. Then when the next break occurs and the field summarizes the next set of child records in the sub-summary I also want it to show the same value in the next set of records below it. I hope it's a little more clear.
It's difficult to understand what your question is. Some statements do not make sense at all. A sub-summary part is based on a field, not on a table. And a summary field is not "sorted".
If you want to show a running total in the body, without restarting at each break, you must define your summary field so. A summary field does not have to restart in order to show sub-summary values when placed in a sub-summary part.
Added:
A summary field displays the sub-summary value only when it's placed in a sub-summary part. If you want to show the same value elsewhere - or use it in a calculation, you must use the GetSummary() function.
Note that the GetSummary() function will only work if the break field is a local field. If you're grouping by parent, make sure you're using the foreign key field in the child table - not the primary key field in the parent table.

Winforms UltraGrid Infragistics grouping by two columns

I’m working on a WinForms vb.net app where you can see a Grid like the one shown in the picture attached and what I need to do is to group by the first two columns (“Grupo” and “Area”).
As you can see in the picture my SQL select statement returns many same “Grupo” and “Area” with different “identificacion” (the last visible column) and the way I would need to present it is more or less the same you can currently see in the picture but with something like for example a + sign at a side which when you press it expands and shows all the complete list of rows and columns (ungrouped) but one row for every different “identificacion”.
I’ve managed to do an approach with SortedColums with the next:
ulgListaSel.DisplayLayout.ViewStyleBand = Infragistics.Win.UltraWinGrid.ViewStyleBand.OutlookGroupBy
Dim band As UltraGridBand = ulgListaSel.DisplayLayout.Bands(0)
Dim sortedColumns As SortedColumnsCollection = band.SortedColumns
sortedColumns.Add("c_area", False, True)
sortedColumns.Add("c_grupo", False, True)
but data is not being displayed the way I’m looking for.
What I get with the code below is shown in figure 2 but you will see that only "Area" colum is shown before expanding and as a default I need all columns with same value to be shown (everythings except "identificacion").
By the way, I’m using UltraGrid v14.2
Thanks in advance.
If I follow you here correctly, you would like to have a group for each row, because the only differences are in the "identificacion" column values? Or you would like to see all the values in the groupByRow, except the "identification", and having only one group?
In the second case you would end up with only one group having the all of the column values there.
In both cases you could create and add a new unbound column in the InitializeLayout event of your UltraGrid, using the root band (0) columns collection, afterwards in the IntializeRow event populate the values of that new column based on your requirements, either using the values of all of the cells (to end up with the same number of groups as the number of differences in the "identificacion" column), or concatenating the values of all of the columns, without the ones in "identificacion", which would end up with a single group only at end.
Also once you do that, you would have to use again the InitializeLayout event of your UltraGrid, and Group by the UltraGrid, by the newly populated Unbound column, by adding it to Sorted Columns, using the same approach that was used for adding the other columns there.

How to keep Reporting services table in the same page

Is it possible to keep table column within the same page? It always go to the new page when table width is larger than page.
I design a report with TableA that have dynamic columns. The dynamic columns are in short format. For example: BS, BN, OT...
In order to understand column meaning, I have to create another table, TableB, below the table to explain. I want to display it horizontally. For example: BS: Basic Salary| BN: Bonus| OT: Over Time| ...
But when TableB has many columns, It go to new page and leave a lot of blank space in previous page. I want to keep columns in the same page, if possible.
I want TableB to display like this:
|X:xx| X:xx | X:xx| X:xx| (Edge of right page)
|X:xx| X:xx|
You're using a horizontal table, a great tutorial is described here
You probably have most of the horizontal table figured out, just this part is important to your issue.
Step 4
Right-click on the column header and select "Edit Group". Enter this
for the group expression: =RowNumber(Nothing). This will cause the
matrix to give you one column per row of data. Since horizontal tables
can end up rather wide, you probably want your table wrap around to
the next "line" after a specific number of columns.
Just simply count the number of rows that fit your page exactly and define this number in your column group expression as described in the tutorial.
Use Column Visibility to hide column instead of Cell Visibility. This should eliminate the blank space.
If the report is still too big, set the report interactive size to 0in,0in. This will keep everything in one page.

Extending Kendo Grid default grouping

How can I implement some operations after kendo finishes grouping? For example, I am displaying some values based on countries, states, cities, etc. After grouping by those columns I would like to sum the values and display the total after each grouping group.
Also, how can I persist the columns state after grouping? For example, if I hide columns and then I decide to group by another column, the state gets refreshed (All columns will be displayed again). Is there a way to maintain the hidden columns after kendo finishes grouping by another column?
Thanks a lot!
1.After grouping the dataSource change event and grid dataBound are fired. In it you can use dataSource.group() method to get grouping infromation and use it like so:
function onDataBound(e) {
var gr = e.sender.dataSource.group();
//some operations on the gr variable.
}
Unfortunately it is not possible to check what exacly change in dataSource it was (grouping, filtering etc).
Better option is to use kendo aggregating mechanism to it. I recommed to try it first. Check this demo to see how it works.
2.Here is another demo I've prepared for you in which you can hide column using column menu and then group it. Hided columns remain hided after it. Can you reproduce your issue in that example if you still have problem with it?

How to filter Grouping Grid in Each Group ExtJS 4

I am creating a Grouping Grid. Here am following these steps:
Store has all records
OnLoad of grid am filtering Store, so am getting all filter data for each group & displaying under corresponding group.
Here All Groups are expanded with filter data and the Icon is "-", but I want the icon should show "+" Icon. So that when I will expand or click on the groupName it will show all records of that group.
Let's say there are 5 records under a group and when Grid loaded it displayed 2 filtered record with "+" icon. So when I click on the GroupName / + icon it should display 5 records.
Basically looking for Group filteration and at collapsed condition it should display the filtered data.
Appreciate your answers & thanks in advance !!
Try if you can get the current grouping field and its value. After this you can filter the store accordingly. Hope it helps or post code sample.