title: Bind data to Gridview instance inside ListView ItemDataBound
body: <p>I got <code>ListView</code> control that has a <code>Gridview</code> inside its <code>ItemTemplate</code> </p>
  
  <pre><code>&lt;asp:ListView ID="InboxList" runat="server" OnItemDataBound="InboxList_ItemDataBound" OnItemCreated="InboxList_ItemCreated"&gt;
     &lt;LayoutTemplate&gt;
        &lt;tr runat="server" id="itemPlaceholder"&gt;&lt;/tr&gt;
     &lt;/LayoutTemplate&gt;
     &lt;ItemTemplate&gt;
        &lt;tr&gt;
           &lt;td&gt;
              &lt;asp:Label Visible="false" ID="Id" runat="server" Text='&lt;%#Eval("Id") %&gt;' /&gt;
           &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
           &lt;td&gt;
              &lt;asp:GridView ID="itemsGridView" runat="server" AutoGenerateColumns="False" BorderWidth="0px" ShowFooter="true" ShowHeader="true" HeaderStyle-CssClass="internal" OnRowDataBound="itemsGridView_RowDataBound"&gt;
                 &lt;Columns&gt;
                    &lt;asp:TemplateField HeaderText="Declared Value"&gt;
                       &lt;ItemTemplate&gt;
                          &lt;asp:Label ID="declaredValue" runat="server" &gt;&lt;%# Eval("DECLAREDVALUE") %&gt;&lt;/asp:Label&gt;
                       &lt;/ItemTemplate&gt;
                       &lt;FooterTemplate&gt;
                          &lt;asp:Label ID="anotherValue" runat="server"&gt;&lt;/asp:Label&gt;
                       &lt;/FooterTemplate&gt;
                    &lt;/asp:TemplateField&gt; 
                 &lt;/Columns&gt;
              &lt;/asp:GridView&gt;
           &lt;/td&gt;
        &lt;/tr&gt;
     &lt;/ItemTemplate&gt;
  </code></pre>
  
  <p>I'm trying to access this Label with <code>ID="declaredValue"</code> value in the <code>RowDataBound</code> Event of my <code>Gridview</code> which is Fires when <code>ListView ItemDataBound</code> Fire..</p>
  
  <p><strong>Listview ItemDatabound Event</strong></p>
  
  <pre><code>protected void InboxList_ItemDataBound(object sender, ListViewItemEventArgs e)
  {
      if (e.Item.ItemType == ListViewItemType.DataItem ||e.Item.ItemType == ListViewItemType.InsertItem||e.Item.ItemType == ListViewItemType.EmptyItem)
      {
          DataTable dt = new DataTable();
          DAL.GetDataID(int.Parse(((Label)e.Item.FindControl("Id")).Text), dt);
          ((GridView)(e.Item.FindControl("itemsGridView"))).DataSource = dt;
          ((GridView)(e.Item.FindControl("itemsGridView"))).DataBind();
      }
  }
  </code></pre>
  
  <p><strong>GridView RowDataBound Event</strong></p>
  
  <pre><code>protected void itemsGridView_RowDataBound(object sender, GridViewRowEventArgs e)
  {
      if (e.Row.RowType == DataControlRowType.DataRow)
      {
          Label lbl = (Label)e.Row.FindControl("declaredValue");
          if (lbl.Text != "")
          {
              //Here Text value equals "" always!
              string value = lbl.Text;
          }
      }
      if (e.Row.RowType == DataControlRowType.Footer)
      {
      }
  }
  </code></pre>
  
  <p>I got access to this label but every time it's <code>Text=""</code> But it has value,
  I don't know what's the best time to access its value. </p>
  
  <p>Please advise.
  Thanks.</p>