Hi leandro.tende...,
Please refer below sample.
HTML
<asp:GridView ID="gvDetails" runat="server"></asp:GridView>
Code
C#
protected void Page_Load(object sender, EventArgs e)
{
string[] arr = "1|8|".Split('|');
gvDetails.DataSource = arr.Where(x => !string.IsNullOrEmpty(x));
gvDetails.DataBind();
}
VB.Net
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
Dim arr As String() = "1|8|".Split("|"c)
gvDetails.DataSource = arr.Where(Function(x) Not String.IsNullOrEmpty(x))
gvDetails.DataBind()
End Sub
Screenshot