Data Grid automatic fill added line
Question

Hello,

 I am using the Data Grid Reactive forge component. I am trying to add a row by clicking a button and auto fill one of the fields with some random variable I have.


As you can see, When I push the AddRows button and i dont select any cell or row on the grid, it automatically generates a new row in index 0 and because i set the value of the column OrderId andr ow number to be the var, it automatically updates. However, if I do select a cell or a row, it creates the new row on top of the selection and the setCell doesn't apply to the right index. I cannot figure out how to retrieve the current row that is being pressed by the user while the button starts the client action. I tried GetSelectedRows but it didn't work for standing on a cell.

Here is the action:

Thank u very much in advance,

Roy Mainfeld

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