How to convert object in to Grid panel in javascripr

  1. #1

    How to convert object in to Grid panel in javascripr

    Hi,

    I have gridpanel in one usercontrol(.ascx page)

    In that page in button click i am tring ti save grid info.Like..



    <ext:Button ID="Button1" runat="server" Text="Save Selected Countries" Icon="Disk">


    <Listeners>


    <Click Handler="#{MyUserControlWindow_GridPanel2}.save();" />


    </Listeners>


    </ext:Button>

    then it is giving script error called "Object Not Suports Property or Method called Save."
    i thing i need to convert this from object type to gridpanel type.


    plz give your sugessions..

    thanks
    satya
  2. #2

    RE: How to convert object in to Grid panel in javascripr

    Hi,

    Do you grid with such ID?


    <ext:GridPanel ID="MyUserControlWindow_GridPanel2"....

    If 'MyUserControlWindow' is ID of the user control, GridPanel2 is ID of the grid then use the following code


    1. If Button1 inside that user control then
    Handler="#{<strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: bold; font-style: normal; font-size: 12px; font-family: inherit; vertical-align: baseline; color: rgb(0, 0, 0); ">GridPanel2}.save[/b]();"

    2. If button outside that user control (for example, in the page) then you should create public property inside the user control
    public GridPanel Grid{get{return GridPanel2;}}

    Set button handler inside code-behind of the
    Button1.Listeners.Click.Handler= MyUserControlwindow.Grid.ClientID+".save();"
  3. #3

    RE: How to convert object in to Grid panel in javascripr

    Hi vladimirh,

    It works perfect.Thanks for your reply.

    I removed client side id for the grid used only grid and used submitdata function.like..

    Handler="#{grdRoleToList}.submitData();"

    regards,
    satya




Similar Threads

  1. [CLOSED] JSON object property: convert to Date value
    By supera in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Jun 14, 2012, 2:50 PM
  2. Replies: 0
    Last Post: Dec 01, 2011, 6:43 AM
  3. [CLOSED] [1.0] Render Panel to a non-ext object
    By Patrick in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 10, 2010, 12:13 PM
  4. Replies: 2
    Last Post: Aug 31, 2009, 6:03 PM
  5. Replies: 0
    Last Post: Apr 14, 2009, 12:33 PM

Posting Permissions