'========================================================
' Overrides of DataGridTextBoxColumn Jive
'========================================================
' next two functions borrow liberally from:
' http://support.microsoft.com/default.aspx?scid=kb;en-us;Q318581
'
' This is why we need the DataSet -- we'll run through, try to find the
' four number fields, and return the correct one (with label) in preferrence
' order.
Protected Overrides Function GetColumnValueAtRow(ByVal cm As CurrencyManager, _
    ByVal RowNum As Integer) As Object
' Get data from the underlying record and format for display.
Dim dvTemp As DataView
Dim dtTemp As DataTable


Dim objReturn As Object = New Object

Try

    Select Case MyBase.DataGridTableStyle.DataGrid.DataSource.GetType.ToString
Case "DataView", "System.Data.DataView"
    dvTemp = CType(MyBase.DataGridTableStyle.DataGrid.DataSource, DataView)
    objReturn = Me.findValueInTable(dvTemp(RowNum).Row)

Case "DataTable", "System.Data.DataTable"
    dtTemp = CType(MyBase.DataGridTableStyle.DataGrid.DataSource, DataTable)
    objReturn = Me.findValueInTable(dtTemp.Rows(RowNum))

Case Else
    Console.WriteLine("!!!! Unexpected DataSource " & _
        "Type in DgtxtcolAddyNumDisplay: " & _
MyBase.DataGridTableStyle.DataGrid.DataSource.GetType.ToString)
    objReturn = MyBase.GetColumnValueAtRow(cm, RowNum)
    End Select


Catch ex As Exception
    mdlErr.errp(Me.cstrObjectName & ".GetColumnValueAtRow", ex, _
        mdlErr.ERR_TYPES.THROW_EXCEPTION)
    objReturn = ""
End Try

Return objReturn

End Function