leskelly
asked on
Converting data grid template control to DataBoundLiteralControl
I'm trying to access the text in a data grid template control which I'm able to do however the results that are returned have 25 characters around it. The characters are not spaces as the trim function does not remove them. My code is:
Public Sub dgProgramManager_Edit(ByVa l sender As Object, ByVal e As System.Web.UI.WebControls. DataGridCo mmandEvent Args) Handles dgProgramManager.EditComma nd
Dim temp As String = CType(e.Item.Cells(3).Cont rols(0), DataBoundLiteralControl).T ext
Dim temp2 As String = Len(temp)
dgProgramManager.EditItemI ndex = e.Item.ItemIndex
End Sub
When I debug it the temp variable has the following content:
" name "
and the length is 29
The result should be just "name".
Any suggestions would be greatly appreciate.
Les
Public Sub dgProgramManager_Edit(ByVa
Dim temp As String = CType(e.Item.Cells(3).Cont
Dim temp2 As String = Len(temp)
dgProgramManager.EditItemI
End Sub
When I debug it the temp variable has the following content:
" name "
and the length is 29
The result should be just "name".
Any suggestions would be greatly appreciate.
Les
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER