1.how can I get the row info after i added a new row ? which event would be raise ?
2.And if the entry value is invalid, how to cancel the row to add ?
3 Answers, 1 is accepted
0
Jack
Telerik team
answered on 12 Dec 2007, 03:35 PM
Hi James,
Thank you for this question.
Currently, RadGridView does not have an event that is fired when a new row is added to the grid. We will correct this in the upcoming Q3 release later this month. Unfortunately, we can not provide a workaround at this moment.
In the next release you will be able to process the DefaultValuesNeeded event, where the newly added row will be passed as a parameter.
We hope this information helps you. Please contact us again in case you have further questions - we will be glad to help you.
How to assign a default value to a cell in the DefaultValuesNeeded event ?
Is like e.row.cell[]index].value = object ?
But the datasource of the grid is not update.
0
Georgi
Telerik team
answered on 28 Dec 2007, 01:37 PM
Hi James,
Thank you for writing.
You could assign a default value exactly as you presumed.
Maybe the problem is that currently the DefaultValuesNeeded event is fired just before the data in the new row is persisted in the underlying data source. That means that the assigned values in the event handler will be applied after the finish of the editing operation of the new row.
We plan on changing this behavior in the next release to have the event fire at the beginning of the editing operation for a new row.