Tech Off Post

Single Post Permalink

View Thread: DataView Object
  • User profile image

    I need to delete the correct one, but the following code does't fetch the correct one.

    Private Function GetRemoveList() As String
                Dim resultStr As String = ""
                Dim drs As DataRow()
                Dim dr As DataRow
                Dim tempDt As DataTable = Me.Page.Session(Me.ID)
                drs = tempDt.Select("Remove=True")---> this is template column
                For Each dr In drs
                    resultStr = resultStr & CStr(dr(0)) & ","
                Next dr
                If resultStr <> "" Then resultStr = Left(resultStr, resultStr.Length - 1)
                GetRemoveList = resultStr
            End Function
    the resultStr is not getting correct one.