Use of the same AddRow() method for two different grids

I have a function I called addnew() that I use to add rows to a grid but when I call the same function to add new row to a different grid that has different number of columns nothing happens. My question can I use addRow() method to add rows to grids that have different number of columns and belong to different tabs / menu items? If so how can I accomplish that? Thank you

note that each grid has a unique name. If you can get all that names (required one) in your addnew() function you can use an addRow() method to add the row to any of your grid.