This is a migrated thread and some comments may be shown as answers.

how to get new row info

3 Answers 195 Views
GridView
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 12 Dec 2007, 08:22 AM
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

Sort by
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.

All the best,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
James
Top achievements
Rank 1
answered on 27 Dec 2007, 02:53 PM
hi,

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.

Regards,
Georgi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
GridView
Asked by
James
Top achievements
Rank 1
Answers by
Jack
Telerik team
James
Top achievements
Rank 1
Georgi
Telerik team
Share this question
or