<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>Read a column from a databsae</Title>
      <Shortcut>Readacolumnfromadatabsae</Shortcut>
      <Description>Read a column from a databsae [VB.NET]</Description>
      <Author>Metaferia Amhayesus</Author>
      <HelpUrl>/PreviewSnippet.aspx?SnippetID=8a7fdfdd-ddab-44bc-9d89-ea01d89ccd38</HelpUrl>
      <SnippetTypes>
        <SnippetType>SurroundsWith</SnippetType>
      </SnippetTypes>
    </Header>
    <Snippet>
      <Code Language="VB"><![CDATA[Dim rowIndex as integer = DataGridView1.CurrentCellAddress.Y 'This will get the row index of the current selected cell
Dim row as datagridviewrow = datagridview1.rows(rowIndex)
dim lyrics as string = row.cells(4).value.tostring 'Get the value of the fifth column on the row selected
RichTextBox1.clear()
Richtextbox1.text = lyrics]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>