event after editform is closed

4 posts, 0 answers
  1. Dimitrios
    Dimitrios avatar
    45 posts
    Member since:
    Jun 2014

    Posted 02 Jun 2015 Link to this post

    Hello,

    I have a radgrid on a page with a custom control as an edit form.

    Within the custom control, there is a button which among other things it also adds a record to another radgrid on the same page (not the parent of the custom control). The button closes the custom control with <editedItem.OwnerTableView.ClearEditItems()>.

    On which event I must include the rebind command of that second radgrid?

    Is there an event which fires when an editform is closed?

     Thanks for your time...

     

     

  2. Eyup
    Admin
    Eyup avatar
    3756 posts

    Posted 05 Jun 2015 Link to this post

    Hello Dimitrios,

    You can use the fireCommand method to execute a Cancel operation, which will raise the ItemCommand event of the grid:
    http://www.telerik.com/help/aspnet-ajax/grid-gridtableview-firecommand.html

    Alternatively, you can use the FireCommandEvent method to achieve the requested functionality on the code-behind:
    http://www.telerik.com/help/aspnet-ajax/grid-fire-command-event-from-code.html


    Then, you can use the ItemCommand event handler to check the e.CommandName and handle your custom logic.

    Hope this helps.

    Regards,
    Eyup
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. Dimitrios
    Dimitrios avatar
    45 posts
    Member since:
    Jun 2014

    Posted 08 Jun 2015 in reply to Eyup Link to this post

    Hi Eyup,

    Sorry man, but I do not understand...

    As you noticed, the custom button is inside the Edit form (EditFormType="WebUserControl") of the grid.

    So, the code of this button is in the ascx.vb file.

    What GridCommand I would use for the FireCommand?

    In other words, in the Item command, what would be the e.CustomName?

    Forgive me if I don't understand, but maybe you should take a little more time reading my scenario above. 

     

    --------------

    I will tell you something a little more general.

    Most of the time, you (the support people) throw us a link of the Telerik knowledge base which explains the relative topic, but the actual problem is rarely addressed!

    Sorry, but this maybe save you time, but it does not serves the purpose...

     

    Thanks

     

  4. Eyup
    Admin
    Eyup avatar
    3756 posts

    Posted 11 Jun 2015 Link to this post

    Hi Dimitrios,

    After running the logic in the WebUserControl code-behind, you can access the container GridEditableItem using the this.NamingContainer directive. Once you have a reference to the grid item, you can use the FireCommandEvent method from the second link with command name "Cancel". This will cause the edit item to close and fire the ItemCommand event of the grid.

    If you have different requirements or further instructions, could you create a new web site to demonstrate a very basic isolated version of your application? You can open a formal support ticket and send this runnable sample to us so we can debug and analyze the project locally.

    Regards,
    Eyup
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top