Hi,
I have a GridView that displays a list of files in all that folders that are owned by a given user. In this GridView, I want to Trim the "FullName" bound field to only include the name of the subfolder in which a given file resides.
Example: My subfolder may be called "UserX_43591b". The "FullName" that is bound to my GridView is cast as "C:\Websites\Website1\Files\UserX_43591b\Doc1.doc".
I need the above example to display as "UserX". Therefore I need to trim everything to the right and left of "UserX" on RowDataBound.
The below code is working well, but I am having trouble getting it to trim everything except the subfolder. As it is currently written, it is only displaying the filename.
Thanks for your help!
Protected Sub AttachmentsGrid_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles AttachmentsGrid.RowDataBound
If e.Row.RowType = DataCo ...
Go to the complete details ...