LboxGrid メソッド (2)


  文字列以外のCellアクセス



SetColumnValue は、Object 型をセットします
SetColumnTag も、Object 型をセットします

SET
  
Public Sub SetColumnValue(ByVal nRow As Integer, _
 ByVal strName As String, ByVal value As Object)

	Me.Rows(nRow).Cells(strName).Value = value

End Sub
Public Sub SetColumnValue(ByVal nRow As Integer, _
 ByVal nCol As Integer, ByVal value As Object)

	Me.Rows(nRow).Cells(nCol).Value = value

End Sub
Public Sub SetColumnValue(ByVal strName As String, ByVal value As Object)

	Me.Rows(nCurrentRow).Cells(strName).Value = value

End Sub
Public Sub SetColumnValue(ByVal nCol As Integer, ByVal value As Object)

	Me.Rows(nCurrentRow).Cells(nCol).Value = value

End Sub
Public Sub SetColumnTag(ByVal nRow As Integer, _
  ByVal strName As String, ByVal value As Object)

	Me.Rows(nRow).Cells(strName).Tag = value

End Sub
Public Sub SetColumnTag(ByVal nRow As Integer, _
 ByVal nCol As Integer, ByVal value As Object)

	Me.Rows(nRow).Cells(nCol).Tag = value

End Sub
Public Sub SetColumnTag(ByVal strName As String, ByVal value As Object)

	Me.Rows(nCurrentRow).Cells(strName).Tag = value

End Sub
Public Sub SetColumnTag(ByVal nCol As Integer, ByVal value As Object)

	Me.Rows(nCurrentRow).Cells(nCol).Tag = value

End Sub
  

GetColumnValue は、Object 型を取得します
GetColumnTag も、Object 型を取得します
GetColumnBoolean は、コードに意味を持たす為に、CheckBox 型のセルで使用すると良いでしょう
( GetColumnValue でも OK です )

GET
  
Public Function GetColumnTag(ByVal strName As String) As Object

	GetColumnTag = Me.Rows(nCurrentRow).Cells(strName).Tag

End Function
Public Function GetColumnTag(ByVal nCol As Integer) As Object

	GetColumnTag = Me.Rows(nCurrentRow).Cells(nCol).Tag

End Function
Public Function GetColumnTag(ByVal nRow As Integer, _
   ByVal strName As String) As Object

	GetColumnTag = Me.Rows(nRow).Cells(strName).Tag

End Function
Public Function GetColumnTag(ByVal nRow As Integer, _
   ByVal nCol As Integer) As Object

	GetColumnTag = Me.Rows(nRow).Cells(nCol).Tag

End Function
Public Function GetColumnValue(ByVal strName As String) As Object

	GetColumnValue = Me.Rows(nCurrentRow).Cells(strName).Value

End Function
Public Function GetColumnValue(ByVal nCol As Integer) As Object

	GetColumnValue = Me.Rows(nCurrentRow).Cells(nCol).Value

End Function
Public Function GetColumnValue(ByVal nRow As Integer, _
  ByVal strName As String) As Object

	GetColumnValue = Me.Rows(nRow).Cells(strName).Value

End Function
Public Function GetColumnValue(ByVal nRow As Integer, _
  ByVal nCol As Integer) As Object

	GetColumnValue = Me.Rows(nRow).Cells(nCol).Value

End Function
Public Function GetColumnBoolean(ByVal strName As String) As Boolean

	GetColumnBoolean = CType(Me.Rows(nCurrentRow).Cells(strName).Value, Boolean)

End Function
Public Function GetColumnBoolean(ByVal nCol As Integer) As Boolean

	GetColumnBoolean = CType(Me.Rows(nCurrentRow).Cells(nCol).Value, Boolean)

End Function
Public Function GetColumnBoolean(ByVal nRow As Integer, _
  ByVal strName As String) As Boolean

	GetColumnBoolean = CType(Me.Rows(nRow).Cells(strName).Value, Boolean)

End Function
Public Function GetColumnBoolean(ByVal nRow As Integer, _
  ByVal nCol As Integer) As Boolean

	GetColumnBoolean = CType(Me.Rows(nRow).Cells(nCol).Value, Boolean)

End Function
  










  infoboard   管理者用   
このエントリーをはてなブックマークに追加





フリーフォントWEBサービス
SQLの窓WEBサービス

SQLの窓フリーソフト

素材

一般WEBツールリンク

SQLの窓

フリーソフト

JSライブラリ