How to capture a IDProperty value in the RowSelect event - GridPanel - Form Details

  1. #1

    How to capture a IDProperty value in the RowSelect event - GridPanel - Form Details

    Hi,
    I am new to Ext.net. Can someone show me how I get this to work?

    I am trying to creat the GridPanel - Form Detail screen on my website but I am having problem getting the "RunID" specified
    in IDProperty for the Store control. The e.ExtraParams["RunId"] is always returning NULL. Can someone tell me how to capture the selected row's RUNID?


    This is link to see what I am trying to accomplish.

    https://examples1.ext.net/#/GridPane.../Form_Details/


    This is my code where I want to select a row and pass the RunID to the Details section of my screen:

    <ext:GridPanel ID="GridPanel1" runat="server" Title="Runs" Margins="0 0 0 0" Icon="ScriptGo"
    Height="500" Width="463" BodyCssClass="x-grid3-row-selected x-grid-group-title"
    StripeRows="true" TrackMouseOver="true" Frame="false" Border="false" Padding="0"
    HideBorders="true">
    <Store>
    <ext:Store ID="XYZStore" runat="server" GroupField="aDate" >
    <Reader>
    <ext:JsonReader IDProperty="RunId">
    <Fields>
    <ext:RecordField Name="XId" Type="Int" />
    <ext:RecordField Name="YId" Type="Int" />

    </Fields>
    </ext:JsonReader>
    </Reader>
    </ext:Store>
    </Store>
    <SelectionModel>
    <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="true">
    <DirectEvents>
    <RowSelect OnEvent="RowSelect" Buffer="100">
    <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="#{formRunDetails}" />
    <ExtraParams>
    <ext:Parameter Name="RunID" Value="this.getSelected().id" Mode="Raw" />
    </ExtraParams>
    </RowSelect>
    </DirectEvents>
    </ext:RowSelectionModel>
    </SelectionModel>
    </ext:GridPanel>

    This is Server side code that shows the RunID being passed while a user selects a row:

    protected void RowSelect(object sender, DirectEventArgs e)
    {
    string runID = e.ExtraParams["RunId"];

    }
    Last edited by extNewBee; May 16, 2012 at 5:23 PM.

Similar Threads

  1. Replies: 2
    Last Post: Jun 06, 2012, 8:50 PM
  2. Replies: 0
    Last Post: Feb 10, 2012, 11:44 PM
  3. [CLOSED] GridPanel with Form Details onClick once keeps refresh
    By CSG in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 06, 2009, 3:59 AM
  4. problem GridPanel with Form Details
    By heysol in forum 1.x Help
    Replies: 1
    Last Post: Nov 29, 2008, 1:19 PM
  5. Example GridPanel with Form Details
    By Diabolicus in forum 1.x Help
    Replies: 1
    Last Post: Oct 21, 2008, 10:07 AM

Posting Permissions