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

AddingNewDataItem Event in Nested GridViews

2 Answers 70 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ludovic Gerbault
Top achievements
Rank 1
Ludovic Gerbault asked on 31 May 2011, 10:45 AM
Hi.

I'm running into a bit of trouble in my scenario.

Here's the thing :

I have a RadGridView, on which I've attached a HierarchyTemplate that contains other gridviews, so far, everything is ok.
On every radgridview, I have a RowDetailsTemplate to display a form that allows the user to create and edit dataitem.

My problem is that each radgridview has the addingnewdataitem event attached to it, so that when the user enters in the component I created, a new blank item would be created for new entries, and if needed, the insert key would be available as well.

The thing is, on the hierarchy grid, I can't seem to be able to enter in the addingnewdataitem handler. Every time I use BeginInsert or insert key, the handler of the top level grid is being launched, not the one of the particular grid the event was launched from.

I think it's because the addingnewdataitem event isn't a routed event, like most of the other ones, so I can't block it at the level I want it to be used, cause usually, I would do something like e.Handled = true, or specify false in the AddHandler method. But it isnt't possible for this particular event.

Do you know a way to work around that ?

Greetings

Ludovic

2 Answers, 1 is accepted

Sort by
0
Ludovic Gerbault
Top achievements
Rank 1
answered on 03 Jun 2011, 10:25 AM
I also have a similiar trouble with the fact that the windowstatechanged event of the RadWindow isn't a routed event as well.

Since I was trying to put a listener at the top level of my application to perform some action any time a radwindow would be minimized, but it doesn't seem as easy as it should be :(
0
Nedyalko Nikolov
Telerik team
answered on 06 Jun 2011, 10:12 AM
Hello Subileau Pascal,

Indeed AddingNewDataItem event is direct so there is no need to stop it (handle it). I cannot reproduce the described behavior.
Could you please send me a sample project, which I can debug on my side in order to see what is going on?
Thank you in advance.

P.S. Could you please ask the question related to RadWindow to the appropriate forum?

Greetings,
Nedyalko Nikolov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Ludovic Gerbault
Top achievements
Rank 1
Answers by
Ludovic Gerbault
Top achievements
Rank 1
Nedyalko Nikolov
Telerik team
Share this question
or