Aug 29, 2011, 6:14 AM
[CLOSED] Gridrow select event
Hi there ,
I have some problems with a rowselect event. I have a gridpanel with rows in codebehind and on each row it should be
possibele to click an an detailform with the elements from the row is coming up.
My code to produce the grid looks like this:
Public Property RowselModel As Ext.Net.RowSelectionModel
Get
Protected ReadOnly Property RowSelect As Ext.Net.RowSelectionModel
Get
If (_gridPanel.RowselModel IsNot Nothing) Then
_rowSelModel = _gridPanel.RowselModel
End If
Return _rowSelModel
End Get
End Property
AddHandler RowSelect.DirectEvents.RowSelect.Event, SelModelRowSelect
Protected Sub SelModelRowSelect(ByVal sender As Object, ByVal e As Ext.Net.DirectEventArgs) Handles rsel. ??????
and at this point there comes my problem. The RowSelectionModel has no event for me.
Gives it a solution for my problem or another way to get the event, when a cell is selected.
Hope you can help me.
Kind regards and a good start in the week
Elke
I have some problems with a rowselect event. I have a gridpanel with rows in codebehind and on each row it should be
possibele to click an an detailform with the elements from the row is coming up.
My code to produce the grid looks like this:
Public Property RowselModel As Ext.Net.RowSelectionModel
Get
If (IsNothing(_rowselModel)) Then
_rowselModel = New Ext.Net.RowSelectionModel
_rowselModel.SingleSelect = True
Dim extp As Ext.Net.Parameter = New Ext.Net.Parameter()
extp.Name = "row"
extp.Value = "record.data"
extp.Mode = Ext.Net.ParameterMode.Raw
extp.Encode = True
_rowselModel.DirectEvents.RowSelect.ExtraParams.Add(extp)
_rowselModel.DirectEvents.RowSelect.Delay = 100
End If
Return _rowselModel
End Get
Set(ByVal value As Ext.Net.RowSelectionModel)
End Set
End Property
Private Property GridPanel As Ext.Net.GridPanel
Get
If (IsNothing(_gridPanel)) Then
_gridPanel = New Ext.Net.GridPanel
_gridPanel.ID = "SafeGrid"
_gridPanel.Border = True
_gridPanel.StripeRows = True
_gridPanel.Title = "SafeGrid"
_gridPanel.AutoHeight = False ' True 'Please set fixed Height for GridPanel or AutoHeight="true"
' _gridPanel.Height = Unit.Pixel(50)
If (_columns IsNot Nothing) Then
For Each s As String In _columns
_gridPanel.ColumnModel.Columns.Add(GetColumn(s))
Next
End If
End If
_gridPanel.Store.Add(_store)
_gridPanel.SelectionModel.Add(RowselModel)
Return _gridPanel
End Get
Set(ByVal value As Ext.Net.GridPanel)
End Set
End Property
In an other class I will get the RowselectionModel and add register the eventProtected ReadOnly Property RowSelect As Ext.Net.RowSelectionModel
Get
If (_gridPanel.RowselModel IsNot Nothing) Then
_rowSelModel = _gridPanel.RowselModel
End If
Return _rowSelModel
End Get
End Property
AddHandler RowSelect.DirectEvents.RowSelect.Event, SelModelRowSelect
Protected Sub SelModelRowSelect(ByVal sender As Object, ByVal e As Ext.Net.DirectEventArgs) Handles rsel. ??????
and at this point there comes my problem. The RowSelectionModel has no event for me.
Gives it a solution for my problem or another way to get the event, when a cell is selected.
Hope you can help me.
Kind regards and a good start in the week
Elke
Last edited by geoffrey.mcgill; Aug 31, 2011 at 4:03 AM.
Reason: please use [CODE] tags, [CLOSED]