May 16, 2012, 4:35 PM
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"];
}
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.