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

Some fun with editable rows

1 Answer 89 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 2
ManniAT asked on 17 Mar 2009, 02:00 AM

it's really bitter what I had to experience with RadGridView today.
I makes me thing if Rad stands for "Rough And Dirty" :)

I already posted the filter crash.
But there is more - editing.

OK - I start with the documentation.
There I find (under "Data Editing Support") some information.

The first I find is "Listen for EditEnded event"....
Sounds logical - to bad that RadGridView does not have this event.
--By the way - the Microsoft DataGrid has something called RowEditEnding (as well as some competitors Grids do have this event)
--Anyhow - since I could not such an event I was looking to the documentation.

So I read on and find how to add a new row.
I find how to edit a cell.
How to delete a row....
But nothing about editing a ROW (is editing a cell more common?)
I read about the cell editing - and guess there could be something like this for a row also.

So I go on to the online samples - and find the event telerik:GridViewRow.EditEnded must be handled.
OK, not so nice that it is not a native event of the grid (like with other grids) but OK.
I add the handler - and nothing happens.
So, the handler is there - it shows up in XAML intellisense - but nothing happens.
Next I used snoop to check for events.
And found that only the "CellEdited" event gets fired.
First thought - thats why the help shows "cell editing" instead of row editing.
But thinking about service databinding and other common scenarios I could not believe this.
And by the way -- the events are (at least) declared.

So my way brought me here - and I found that I have to bind to GridViewDataControl.RowEditEnded.
So I added this in my XAML -- and got an error message.
OK - than make it from code.
Of course this is AddHandler -- and so I get no "press tab to create...."
This made me think that Rad could not stand for Rapid Application Devel :)
Anyhow - handcoding the event I was curious if it will work now (snoop told me a different thing).

And YES - it did not work :(

Cell Editing is useless - we build distributed apps - I can't go out an call the service for every single field.
This would also make problems with auditing.
I just imagine - normally I get "user XXX changed ZZZ".
Now I would get such an entry 20 Times - per row per user per change...

Documentation does not fit the current version there you can find (Data Editing Event Sequence) that GridViewRow.EditEnded is the last event in....
The need to add handlers via AddHandler has nothing to do with "normal WPF development" - this should be possible in XAML.



1 Answer, 1 is accepted

Sort by
Pavel Pavlov
Telerik team
answered on 19 Mar 2009, 06:21 PM

Hi Manfred ,

Please excuse us for the inconvenience caused. The missing documentation is already being prepared for the service pack release. We are also preparing some samples to fill in the gap of missing resources for the changes in editing API.

I am attaching a small sample to illustrate a way to perform row by row editing and avoid the troubles mentioned by you.

What is important here: In order to be able to handle the RowEditEnded event you will have to set ValidationMode  to Row (the default is cell).

* Note: After having a look at the example you may notice that we do not use the e.NewData and use a substitute method GetNewValue in the event handler. This is because of a problem we found in the e.NewData not always having the correct values. Please use that approach until the service pack release (which I believe is coming pretty soon).

One more time thanks for the constructive feedback. Your suggestions are in our top priority list now.


Pavel Pavlov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Asked by
Top achievements
Rank 2
Answers by
Pavel Pavlov
Telerik team
Share this question