Returning GridRow values without tags as a delimited string

Oct 15, 2012 at 1:05 PM

Just Sharing: I wanted something like this...

Public Shared Function GetRow(ByRef grd As ExtAspNet.Grid, ByRef RowIdx As Integer, Optional ByVal Delim As String = ";", Optional bRemoveTags As Boolean = True) As String
Dim strOutput As String = ""
Dim meRow As ExtAspNet.GridRow = grd.Rows(RowIdx)
For Each value As Object In meRow.Values
Dim strValue As String = value.ToString
If bRemoveTags = True Then
strValue = strValue.Replace("</span>", "")
Dim closePos = InStrRev(strValue, ">")
If closePos > 0 Then strValue = Mid(strValue, closePos + 1)
End If
strOutput = strOutput & strValue & Delim
Next
Return strOutput
End Function