Olá a todos,
Estou melhorando uma classe em VB.Net para o SourceGrid, e, estou tendo dificuldade em fazer uma classe semelhante a uma existente no DataSource, que é a seguinte:
DataSource = [NomeDoDataSource].CurrentRow.Cells(0).value
SourceGrid = [NomeDoSourceGrid].CurrentRow.Cells(0)
Public Class clsSourceGrid
Private Function GetMatrix(ByVal Row As Int32, ByVal Col As Int32) As Object
Try
If Me(Row, Col) Is Nothing Then
Return Nothing
Else
Return Me(Row, Col).Value
End If
Catch ex As Exception
Return Nothing
End Try
End Function
Public Class CurrentRow
Inherits clsSourceGrid
Public Shared ReadOnly Property Cells(ByVal index As Integer) as Object
Get
Return MyBase.TextMatrix(iCurrentRow, index)
End Get
End Property
End Class
End Class
Desta forma não estou conseguindo chamar a função GetMatrix na raiz do clsSourceGrid, para que retorne o valor da célula do grid. O
iCurrent muda automaticamente quando clico em outra linha do grid, e o
index seria passado pela proprieadade "cells"
Desde já agradeço pela ajuda.