Mapping between two Extjs grid - extjs3

I am trying to map two Extjs grids in a single page, such that updating a first extjs grid will update the rows of second grid.
Till now i am maintening mapping by having an additional column in first grid which contains string of all data of corresponding row (separated by 4 hashes), but each time a row updated in first grid adds a new row in second grid which i need to change. Such that updating will also delete corresponding rows in second grid
Kindly help on urgent basis :)

Got the solution...
Created one more column in grid 2 that will store the index of row of grid 1 that we are updating using var item = grid.getSelectionModel().getSelected();

Related

Flutter charts split the overwritten values on X - axis

Hello I am trying to create a chart that contains some dates on X-axis, but when I add the list same dates are overeaten from the last one. For example in the following picture the is one insertion on 14/04 on insertion on 19/04, two insertion on 20/04 and 6 insertions on 21/04. Is there a way to split them? I dont want to switch to date chart.

Copy paste is not triggering cell renderer for all the rows

I have implemented ag-grid in angular application.
ag-grid version: 21.0.0
angular version: 6
I am having a grid, which has 108 columns and 200 rows.
Around 50 of those columns are having separate cell renderers.
I am copying certain column values from a cell and pasting them into a column for all the rows.
On processCellFromClipboard event, I expected all the rows refresh method will be triggered. But it didn't happen.
But the cell renderer is refreshed only for the rows which are visible in the DOM at that particular time. Only for 20 rows cell renderer is getting triggered. For others it is not getting triggered.
Is there any option to refresh/re-render for all the rows which are not visible by that time?
agGrid has a rowBuffer attribute that handles the number of rows that the grid can actually interact with at a time.
If you are using pagination you can easily set it to the current page size, otherwise set it to the number you want or the one that you display at a time.
[If that didn't help please post more code and ping me]

Ag-Grid: lock a column's position to the last column

I am wondering if there is a way to effectively lock a column in Ag-Grid so that the column is always the very last column no matter what.
Background
What I am ultimately looking for is to avoid the blank space after the last column if the grid size is wider than all column width combined. This is to give the grid a consistent, professional look especially considering even/odd rows are rendered usually in different color. I would prefer the blank space also has that alternating background color.
Given there seems to be no grid property that forces the grid to render the blank space at the end as a pseudo column, I am therefore considering to add a pseudo column manually in such a way that:
the pseudo column has no header
the pseudo column has no data
the pseudo column is not sortable (achieved via sortable: false)
the pseudo column is not manually resizable (achieved via resizable: false)
the pseudo column is the only column which has suppressSizeToFit: false
lock the pseudo column to always be the last column so that user cannot drag a column to the right side of it
I've found a way to achieve everything apart from the last item in the above list. I know I can suppressMovable: true but that only ensures the column itself is not draggable, it does not prevent user from dragging a column to the right side of it.
Effectively, I am looking for something similar to lockPosition but instead of locking the column to the front I want to lock the column to the end.
Keep an eye on currently open AG-3326 issue in ag-grid backlog https://www.ag-grid.com/ag-grid-pipeline/
"Allow locking ( lockPosition ) a column to always be either the first or last columns (currently only the first column is supported)"
What I am ultimately looking for is to avoid the blank space after the last column if the grid size is wider than all column width combined
You could use sizeColumnsToFit() API for columns to adjust in size to fit the grid horizontally. Using this API, there won't be any blank space after the last column, but make sure you have not specified the width for at least one column. This is the column that will expand/shrink to fit the size of the grid.
Call sizeColumnsToFit() after the gridReady event has fired.
Here is an effective workaround to lock the right-most column until AG-3326 is implemented.
onColumnMoved: params => {
const columnCount = params.columnApi.getAllColumns().filter(c => c.isVisible()).length;
const maxIndex = columnCount - 2;
if(params.toIndex > maxIndex) {
params.columnApi.moveColumnByIndex(params.toIndex, maxIndex);
}
}
Any column that is moved to the right of the 'locked' column is immediately moved to the left of the 'locked' column.

How to get the values in the same column in Tableau?

Hi ,
Sorry for blur image! As We can see for Conversion Attrition ,Converted ,Remaining - some values are there!But it's dividing ,I need the values in the same column.
I have done this but the division is coming ! I need help here ! Thanks in advance.
If you want to reduce the number of column headers, remove some discrete (blue) fields from the columns shelf. If you want to reduce the number of row headers, remove some discrete (blue) fields from the rows shelf.
Depending on your data shape and values, you might want to put the fields you take off those shelfs onto another shelf, such as the text shelf.
The easiest approach is treat understanding Tableau as a series of experiments and learn from them -- i.e. if I do this, what does Tableau do in response? In this case, the discrete fields on the rows and columns axis define the row and column headers for your viz, dividing the view into panes and cells.
You have to also keep aware of which fields you are treating as dimensions in your view. That will determine the level of detail of the viz and the number of marks.

DataGrid reconfigure with grid columns resulting in empty grid

I am trying to use reconfigure to rearrange the columns in data grid based on user moving and rearranging the columns.
Below here I am trying to do some testing on reconfigure, but the grid becomes empty. Is this the correct way to do it?
var dgorder = dataGrid.getView().getGridColumns();
dataGrid.reconfigure(undefined, dgorder);