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

Alternate For Updating Row Event

6 Answers 116 Views
GridView
This is a migrated thread and some comments may be shown as answers.
meraj
Top achievements
Rank 1
meraj asked on 25 Jan 2011, 02:32 PM
Hi....
       Which is the event for Updating Cell And Updating Record...
I m using CurrentRowChanging Event For this but this event fires evertime i fill the dataset which is bound to the Grid...
I want an event which will fire only when I Update a row and come out of that row...

6 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 25 Jan 2011, 02:46 PM
Hello Meraj,

This should work for you.
Private Sub rgvPendingItems_RowsChanged(ByVal sender As System.Object, ByVal e As Telerik.WinControls.UI.GridViewCollectionChangedEventArgs) Handles RadGridView1.RowsChanged
    If e.Action = NotifyCollectionChangedAction.ItemChanged AndAlso Me.rgvPendingItems.CurrentRow.Index > -1 Then
        MessageBox.Show("Item(s) Changed")
    End If
End Sub

Let me know if you have any issues
Richard
0
meraj
Top achievements
Rank 1
answered on 25 Jan 2011, 03:32 PM
Hi...........

    I have tried this event and the code you posted , but it fires for every cell changed but I want it to fire at the time of leaving the row. And I should be able to cancel the actions.. For this I tried RowsChanging event but still not working ...
0
Richard Slade
Top achievements
Rank 2
answered on 25 Jan 2011, 04:26 PM
Hi,

The way the RadGridView works means that when you click away from the cell, the RowChanged will fire as the row has changed at that point. I'd suggest having a look at my Code Library Article here on IDataError which I think will help you.

regards,
Richard
0
Richard Slade
Top achievements
Rank 2
answered on 26 Jan 2011, 10:24 AM
Hello Meraj,

Did this help? If you need more information, just let me know. If this helped enough, please remember to mark as answer.
Thanks
Richard
0
meraj
Top achievements
Rank 1
answered on 26 Jan 2011, 12:05 PM
i am using rowvalidating event ,for my purpose.
0
Richard Slade
Top achievements
Rank 2
answered on 26 Jan 2011, 01:05 PM
Hello Meraj,

That's also another option. If you need further help, please let me know
regards,
Richard
Tags
GridView
Asked by
meraj
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
meraj
Top achievements
Rank 1
Share this question
or