Ag-Grid : Modify data in one grid while applying filter in another Grid











up vote
2
down vote

favorite












I have 2 grids side by side as per design and both will have same no.of rows. i need to apply filter in one column of grid1 and same amount rows should be in both the grids after applying filter also.



Component.ts



 GridOptions = <GridOptions>{
enableFilter: true,
rowSelection: 'multiple',
enableSorting: false,
enableColResize: true,
singleClickEdit: true,
animateRows: true,
headerHeight: 50,
rowClass: 'rowClass',
headerClass: 'GridHeader',
overlayNoRowsTemplate: " ",
context: {
componentParent: this
},
onFilterModified: this.GridFilter
};

GridColumnDefs = [{
headerName: "Student Name", field: "name", width: 90, editable: true,
filter: 'agTextColumnFilter'
},];

releaseFilter(params: any) {
var data = params.api.getRenderedNodes()
}


I got the filtered rows of grid1 but dont know how to set the filtered index for the second grid. Thanks in advance










share|improve this question
























  • Please consider creating a Minimal Sample StackBlitz Sample replicating this issue,
    – SiddAjmera
    Nov 20 at 10:02










  • this is not an issue. dont know how to implementation. After filter if the grid1 has two records then grid2 should have two records
    – anand
    Nov 20 at 10:20












  • Sure. Just click here and you'll be good to go.
    – SiddAjmera
    Nov 20 at 10:21

















up vote
2
down vote

favorite












I have 2 grids side by side as per design and both will have same no.of rows. i need to apply filter in one column of grid1 and same amount rows should be in both the grids after applying filter also.



Component.ts



 GridOptions = <GridOptions>{
enableFilter: true,
rowSelection: 'multiple',
enableSorting: false,
enableColResize: true,
singleClickEdit: true,
animateRows: true,
headerHeight: 50,
rowClass: 'rowClass',
headerClass: 'GridHeader',
overlayNoRowsTemplate: " ",
context: {
componentParent: this
},
onFilterModified: this.GridFilter
};

GridColumnDefs = [{
headerName: "Student Name", field: "name", width: 90, editable: true,
filter: 'agTextColumnFilter'
},];

releaseFilter(params: any) {
var data = params.api.getRenderedNodes()
}


I got the filtered rows of grid1 but dont know how to set the filtered index for the second grid. Thanks in advance










share|improve this question
























  • Please consider creating a Minimal Sample StackBlitz Sample replicating this issue,
    – SiddAjmera
    Nov 20 at 10:02










  • this is not an issue. dont know how to implementation. After filter if the grid1 has two records then grid2 should have two records
    – anand
    Nov 20 at 10:20












  • Sure. Just click here and you'll be good to go.
    – SiddAjmera
    Nov 20 at 10:21















up vote
2
down vote

favorite









up vote
2
down vote

favorite











I have 2 grids side by side as per design and both will have same no.of rows. i need to apply filter in one column of grid1 and same amount rows should be in both the grids after applying filter also.



Component.ts



 GridOptions = <GridOptions>{
enableFilter: true,
rowSelection: 'multiple',
enableSorting: false,
enableColResize: true,
singleClickEdit: true,
animateRows: true,
headerHeight: 50,
rowClass: 'rowClass',
headerClass: 'GridHeader',
overlayNoRowsTemplate: " ",
context: {
componentParent: this
},
onFilterModified: this.GridFilter
};

GridColumnDefs = [{
headerName: "Student Name", field: "name", width: 90, editable: true,
filter: 'agTextColumnFilter'
},];

releaseFilter(params: any) {
var data = params.api.getRenderedNodes()
}


I got the filtered rows of grid1 but dont know how to set the filtered index for the second grid. Thanks in advance










share|improve this question















I have 2 grids side by side as per design and both will have same no.of rows. i need to apply filter in one column of grid1 and same amount rows should be in both the grids after applying filter also.



Component.ts



 GridOptions = <GridOptions>{
enableFilter: true,
rowSelection: 'multiple',
enableSorting: false,
enableColResize: true,
singleClickEdit: true,
animateRows: true,
headerHeight: 50,
rowClass: 'rowClass',
headerClass: 'GridHeader',
overlayNoRowsTemplate: " ",
context: {
componentParent: this
},
onFilterModified: this.GridFilter
};

GridColumnDefs = [{
headerName: "Student Name", field: "name", width: 90, editable: true,
filter: 'agTextColumnFilter'
},];

releaseFilter(params: any) {
var data = params.api.getRenderedNodes()
}


I got the filtered rows of grid1 but dont know how to set the filtered index for the second grid. Thanks in advance







javascript angular typescript ag-grid ag-grid-angular






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 20 at 9:59









Eugene Mihaylin

9621424




9621424










asked Nov 20 at 9:52









anand

745933




745933












  • Please consider creating a Minimal Sample StackBlitz Sample replicating this issue,
    – SiddAjmera
    Nov 20 at 10:02










  • this is not an issue. dont know how to implementation. After filter if the grid1 has two records then grid2 should have two records
    – anand
    Nov 20 at 10:20












  • Sure. Just click here and you'll be good to go.
    – SiddAjmera
    Nov 20 at 10:21




















  • Please consider creating a Minimal Sample StackBlitz Sample replicating this issue,
    – SiddAjmera
    Nov 20 at 10:02










  • this is not an issue. dont know how to implementation. After filter if the grid1 has two records then grid2 should have two records
    – anand
    Nov 20 at 10:20












  • Sure. Just click here and you'll be good to go.
    – SiddAjmera
    Nov 20 at 10:21


















Please consider creating a Minimal Sample StackBlitz Sample replicating this issue,
– SiddAjmera
Nov 20 at 10:02




Please consider creating a Minimal Sample StackBlitz Sample replicating this issue,
– SiddAjmera
Nov 20 at 10:02












this is not an issue. dont know how to implementation. After filter if the grid1 has two records then grid2 should have two records
– anand
Nov 20 at 10:20






this is not an issue. dont know how to implementation. After filter if the grid1 has two records then grid2 should have two records
– anand
Nov 20 at 10:20














Sure. Just click here and you'll be good to go.
– SiddAjmera
Nov 20 at 10:21






Sure. Just click here and you'll be good to go.
– SiddAjmera
Nov 20 at 10:21



















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53390313%2fag-grid-modify-data-in-one-grid-while-applying-filter-in-another-grid%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53390313%2fag-grid-modify-data-in-one-grid-while-applying-filter-in-another-grid%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Feedback on college project

Futebolista

Albești (Vaslui)