I found the workaround.
Ag-grid group cell renderer doesn't work without importing 'ag-grid-enterprise' dependency. So to implement the row expand feature with community version, I used full width cell renderer (https://www.ag-grid.com/javascript-grid-full-width-rows/).
Steps: Let's assume on button click you want to expand that row.
full width cell renderer have 'isFullWidthCell' function which tells weather to show the row in full width or not.
So now, on button click you have to add a property to a rownode and return that property from 'isFullWidthCell' function. (I am adding new row as well on button click and for that row only setting that property)
For example:
function isFullWidthCell(rowNode) {
return rowNode.data.isExpandable; }
So if this property is true then it will expand that row.
It might be confusing, But go through the documentation once, It might help.