Hi,
I've recently made a Webgrid that allows users to Add new records to the grid,but they've also asked that, when they push the button to add a new line to the Grid,this new line already have certain standard data filled in.
I've been looking to intercept the addnewrow event to add the data programmaticallyso it already shows when the new line is added to the grid, but no succes.
Can someone help me with this? When the new row is added to the grid, it has to be filledwith the standard settings.
Thanks for any help you can give me
Did you ever figure out how to do this? I need to do the same thing in my app.
Thanks
klpo.
The column object has a DefaultValue property. With this property set, any new rows you add to the grid on the client will have these values set in the cell that corresponds to this column.
If you still want to do this programmatically, such as if your "default value" may vary from row to row, I suggest using the InitializeRow client-side event.