AddingNewDataItem Event in Nested GridViews

3 posts, 0 answers
  1. Ludovic Gerbault
    Ludovic Gerbault avatar
    226 posts
    Member since:
    Apr 2009

    Posted 31 May 2011 Link to this post


    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 ?


  2. Ludovic Gerbault
    Ludovic Gerbault avatar
    226 posts
    Member since:
    Apr 2009

    Posted 03 Jun 2011 Link to this post

    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 :(
  3. Nedyalko Nikolov
    Nedyalko Nikolov avatar
    871 posts

    Posted 06 Jun 2011 Link to this post

    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?

    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
Back to Top