I think there resolved, was not passing the parameter:
<ext:Parameter Name="Values" Value="Ext.encode(#{GridPanelWS}.getRowsValues({selectedOnly: true}))" Mode="Raw" />
Inspecting, I can see the values, but does not go to a messagebox or label, the value is not displayed.
New Code
<ext:Store ID="Store1" runat="server" GroupField="inicio">
<Reader>
<ext:JsonReader>
<Fields>
<ext:RecordField Name="idturma" />
<ext:RecordField Name="inicio" />
<ext:RecordField Name="horaini" />
<ext:RecordField Name="horafim" />
<ext:RecordField Name="etp_Etapa" />
<ext:RecordField Name="Educador" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
<ext:GridPanel
ID="GridPanelWS"
runat="server"
StoreID="Store1"
StripeRows="true"
Title="Worskops"
Collapsible="true"
AutoExpandColumn="inicio"
Width="650"
Height="550"
>
<ColumnModel runat="server" ID="ctlWS">
<Columns>
<ext:Column runat="server" ColumnID="ID" Header="" DataIndex="idturma" MenuDisabled="true" Fixed="true" Resizable="false" Width="0"/>
<ext:DateColumn runat="server" Width="75" DataIndex="inicio" Header="Data" Format="dd/MM/yy" />
<ext:DateColumn runat="server" Width="45" DataIndex="horaini" Header="Inicio" Format="H:mm" />
<ext:DateColumn runat="server" Width="45" DataIndex="horafim" Header="Inicio" Format="H:mm" />
<ext:Column runat="server" ColumnID="etp_Etapa" Width="250" DataIndex="etp_Etapa" Header="Atividade" />
<ext:Column runat="server" ColumnID="etp_Etapa" Width="150" DataIndex="Educador" Header="Palestrante" />
</Columns>
</ColumnModel>
<LoadMask ShowMask="true" />
<SelectionModel>
<ext:CheckboxSelectionModel runat="server" ID="csmWS" />
</SelectionModel>
<View>
<ext:GroupingView
ID="gpvWS"
HideGroupedColumn="true"
runat="server"
Forcefit="true"
GroupTextTpl='{text}'
EnableRowBody="true">
<Templates>
<Header Visible="False" ID="ctl3" runat="server"></Header>
</Templates>
</ext:GroupingView>
</View>
<Buttons>
<ext:Button ID="btnWS" runat="server" Text="Prosseguir" Visible="true">
<DirectEvents>
<Click OnEvent="bntWS_Click">
<ExtraParams>
<ext:Parameter Name="Values" Value="Ext.encode(#{GridPanelWS}.getRowsValues({selectedOnly: true}))" Mode="Raw" />
</ExtraParams>
<EventMask ShowMask="true" />
</Click>
</DirectEvents>
</ext:Button>
</Buttons>
</ext:GridPanel>
<div style="width:590px; height:100px; border:1px solid gray; padding:5px;">
<ext:Label ID="Label1" runat="server" />
Code Behind
string json = e.ExtraParams["Values"];
if (string.IsNullOrEmpty(json))
{
return;
}
Dictionary<string, string>[] lst = JSON.Deserialize<Dictionary<string, string>[]>(json);
foreach (Dictionary<string, string> row in lst)
{
int id = Convert.ToInt32(row["idturma"]);
DateTime inicio = Convert.ToDateTime(row["inicio"]);
DateTime horaini = Convert.ToDateTime(row["horaini"]);
DateTime horafim = Convert.ToDateTime(row["horafim"]);
string etapa = row["etp_Etapa"];
string educador = row["Educador"];
}
resultado(lst.Length);
}
protected void resultado(int result) {
this.Label1.Html = "</br></br>" + result.ToString() + "</br></br>";
}