Jan 23, 2012, 3:38 PM
[CLOSED] GridPanel RowSelectModel don´t working
Hi...
I am doing something wrong, probably!
I declare in my GridPanel the Selection Model as follows
I am doing something wrong, probably!
I declare in my GridPanel the Selection Model as follows
<SelectionModel>
<ext:RowSelectionModel runat="server" Mode="Single" />
</SelectionModel>
I have a button, called btnDetails, when i call with DirectEvent the protect sub ShowDetails<ext:Button runat="server" ID="btnDetails" Icon="ApplicationEdit" Text="Detalhar">
<DirectEvents>
<Click OnEvent="ShowDetails"
Failure="Ext.MessageBox.alert('Load failed', 'Error during ajax event!');">
<EventMask ShowMask="true" Target="CustomTarget" CustomTarget="={#{grdSugestoes}.body}" />
</Click>
</DirectEvents>
</ext:Button>
But, in ShowDetail, the collection SelectedRows allways return 0 in count property, although a selected line in the gridProtected Sub ShowDetails(sender As Object, e As Ext.Net.DirectEventArgs)
Dim sm As Ext.Net.RowSelectionModel = Me.grdSugestoes.GetSelectionModel()
Dim row As Ext.Net.SelectedRow
If sm.SelectedRows.Count > 0 Then
row = sm.SelectedRows(0) 'Pode ter mais de uma selecioanda, mas pego a primeira, sempre
Me.wndSugestoesDetail.Start(Convert.ToInt64(row.RecordID.ToString), grdSugestoes.GetStore())
Else
Dim msg As New Ext.Net.MessageBox
msg.Alert("REGISTRO NÃO SELECIONADO", "Por favor, selecione um registro na lista para ver o detalhamento!")
msg.Show()
End If
End Sub
Last edited by Daniil; Jan 24, 2012 at 12:00 PM.
Reason: [CLOSED]