How to get client reference on Store

Page 1 of 4 123 ... LastLast
  1. #1

    How to get client reference on Store

    I have a problem to get client reference on ext:Store component. This does not work for me:

    var Store1 = Ext.ComponentMgr.get("<%= Store1.ClientID %>");
    Result is : variable is undefined.
  2. #2
    Try using:

    var st1 = Ext.getComponentMgr.get('Store1');
    or

    var st1 = Ext.getCmp('Store1');
  3. #3
    Hi all,

    1. I'm afraid I have never met this in ExtJS/Ext.Net yet.
    Ext.getComponentMgr.get
    2. Ext.getCmp() is alias for Ext.ComponentMgr.get(), they work the same.

    3. Where do you use it?
    var Store1 = Ext.ComponentMgr.get("<%= Store1.ClientID %>");
  4. #4
    no, it does not help . result is the same: undefined
  5. #5
    this :
    Ext.getComponentMgr.get
    dont exists ...

    This is what I need to do: Get some data from web form (more than one time), store it in my ext:Store component using client side code. And when user finish adding data to store, he click on button Save. After that event on server code I need to get data from my ext:Store component and put them into database. (Is that possible?)

    here is semple of code:

            function ButtonEBank_ListenersClick() {
                var Store1 = Ext.ComponentMgr.get("Store1");
                //her I need to put my objects to Store1 ...
            }
    here is listener on button click:
                                        <ext:Button ID="ButtonEBank" runat="server" Text="E-bank" IconCls="icon-e-bank" Scale="Large" Flat="true" IconAlign="Left" >
                                            <Listeners>
                                                <Click Handler="ButtonEBank_ListenersClick();" />
                                            </Listeners>
                                        </ext:Button>
  6. #6
    I need to say that my Store is not connected to GridPanel. It is independent. I use Store only for transfer data between client and server....
  7. #7
    @boris, please clarify did you see my post?

    Lets return to your initial request. Please keep one question (or tightly related questions) per one thread.
  8. #8
    Ok, if you think on your question :
    3. Where do you use it?
    var Store1 = Ext.ComponentMgr.get("<%= Store1.ClientID %>");
    I answer on it up ...
    Get some data from web form (more than one time), store it in my ext:Store component using client side code.
    Or maybe I don't understand on what do you think?
  9. #9
    I'm sorry cut/paste error, Obviously I wanted to write " Ext.ComponentMgr.get()".
    Anyway I've ever used Ext.getCmp;

    Bye.

    Quote Originally Posted by Daniil View Post

    1. I'm afraid I have never met this in ExtJS/Ext.Net yet.
    Ext.getComponentMgr.get
  10. #10
    No problem, @alainfo :)

    @boris, you answered on the question "why?", I asked "where?" :)
Page 1 of 4 123 ... LastLast

Similar Threads

  1. Render dynamic store id in client different when postback
    By Nhím Hổ Báo in forum 1.x Help
    Replies: 1
    Last Post: May 03, 2012, 8:50 PM
  2. Replies: 10
    Last Post: Apr 20, 2012, 12:34 PM
  3. [CLOSED] assign collection to store on the client
    By LeeTheGreek in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 23, 2010, 6:46 PM
  4. Can Store.DateSource send sub object to client?
    By firebank in forum 1.x Help
    Replies: 2
    Last Post: Apr 15, 2010, 11:48 AM
  5. Coolite Client Library Reference
    By niceguymattx in forum 1.x Help
    Replies: 1
    Last Post: Mar 10, 2010, 6:00 AM

Tags for this Thread

Posting Permissions