[CLOSED] Pass parameter from grid to window and from window to DirectEvent

  1. #1

    [CLOSED] Pass parameter from grid to window and from window to DirectEvent

    Hi,

    I have a gridpanel with a Imagecommand and an upload-window.

    I need to to do the following steps:

    1. click ImageCommand
    2. Open upload window
    3. Pass record.data.ID to upload window
    4. Upload an Image
    5. Click Save
    6. Call a DirectEvent with record.data.ID as parameter


    How can I store record.data.ID in a window, what would be the correct ext.net way?

    I could use global variables, but is there a better way?

    Or, is there an easy way to ask for the last clicked ImageCommand/Row and get the id? The window is Modal
    Last edited by Daniil; Oct 04, 2013 at 5:53 AM. Reason: [CLOSED]
  2. #2
    Hi @blueworld,

    I don't think there is a better way than saving a record's id in some variable.

    Personally, I would probably put it into a Window object.
    App.Window1.recordId = record.data.ID;
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi @blueworld,

    I don't think there is a better way than saving a record's id in some variable.

    Personally, I would probably put it into a Window object.
    App.Window1.recordId = record.data.ID;
    Thank you Daniil

    Are there any steps that I need to do, in order to add this variable to my window? Like defining something in the markup (CustomConfig)?
    Or can I just go on?
  4. #4
    JavaScript is very flexible, you can just add any property without any preparation.

Similar Threads

  1. Replies: 1
    Last Post: Nov 15, 2012, 1:38 AM
  2. Replies: 3
    Last Post: Mar 19, 2012, 12:35 PM
  3. pass parameter by selected row in grid panel
    By vahid.ch in forum 1.x Help
    Replies: 0
    Last Post: Dec 19, 2011, 11:05 AM
  4. Pass and get parameters from Window
    By AlexMaslakov in forum 1.x Help
    Replies: 1
    Last Post: Aug 19, 2011, 8:16 PM
  5. Get values of a window and pass to other window
    By flaviodamaia in forum 1.x Help
    Replies: 2
    Last Post: Mar 19, 2009, 1:07 AM

Posting Permissions