[Data Grid Reactive] Add Row Action adding row "above" current row instead of below.
Forge component by OutSystems R&D

Is there any parameter so that the AddRowFunction could add the row below the actual row instead of above? At the moment there is only the default option.

If not is there any possible way to change that (either by code or other sheaneanigans)?


PS: I think this would be quite an useful implementation

Solution

Thanks for the feedback, we will discuss this and if it is a requirement that proves to be helpful to more users then we'll consider adding it.

Meanwhile, our source code is available in github. Please take a look and explore it, maybe you can find a way to achieve your use case. You can even do a Pull Request and we'll be more than happy to review, discuss with you, run tests and then merging in the product.

I would say to look at the file outsystems-datagrid-reactive/code/src/WijmoProvider/Features/Rows.ts 


Best regards,

Bruno Martinho

Solution

Hello @Takeru Mazuelos ,

Unfortunately, there is no simple way to do this, the way rows are being added are deep inside the core function and they aren't overridable.

Can you share a little bit more the use case? The idea was to be able to choose programmatically adding rows on top or below? Using different context item like Add row(s) above and Add row(s) below? 

Thanks,

Bruno Martinho

the use case was to be able to paste from the clipboard more rows than there are availeable in the grid, and to automatically add the needed rows in order for all the data in the clipboard to fit (I already was able to develop this, and I think it could be an usefull addition to the API). The thing is that if the rows are added above the selection instead of below, it may overwrite some of the cells with data in it.

If there is no "simple" way to do it, what wouldbe the more complex way to approach it? I'll try experimenting a bit also and get back to you if you want.

Solution

Thanks for the feedback, we will discuss this and if it is a requirement that proves to be helpful to more users then we'll consider adding it.

Meanwhile, our source code is available in github. Please take a look and explore it, maybe you can find a way to achieve your use case. You can even do a Pull Request and we'll be more than happy to review, discuss with you, run tests and then merging in the product.

I would say to look at the file outsystems-datagrid-reactive/code/src/WijmoProvider/Features/Rows.ts 


Best regards,

Bruno Martinho

Thank you Bruno,

I will take a look at the repo.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.