Q:

gridview within itemtemplate getting overwrite once bind in main grid view rowdatabind method

getting struckked in one of the situation. created grid with multiple grids within it. code as follows
<asp:GridView CssClass="table-responsive" ID="gridReport" runat="server"
                                AutoGenerateColumns="false"
                                DataKeyNames="sales_id" OnRowDataBound="gridReport_RowDataBound">
                                <Columns>

                                    <asp:BoundField DataField="Partno" HeaderText="PART No.">
                                        <ItemStyle />
                                    </asp:BoundField>

                                    <asp:BoundField DataField="Partname" HeaderText="PART NAME">
                                        <ItemStyle />
                                    </asp:BoundField>

                                    <asp:TemplateField HeaderText="ANNUAL QTY (in Nos.)">
                                        <ItemTemplate>
                                            <asp:GridView ID="Grid_YEAR" runat="server" AutoGenerateColumns="true">
                                            </asp:GridView>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Raw Material">
                                        <ItemTemplate>
                                            <asp:GridView ID="Grid_RM" runat="server" AutoGenerateColumns="true">
                                            </asp:GridView>
                                        </ItemTemplate>
                                    </asp:TemplateField>
 </Columns>
                                </asp:GridView>

and in code behind
protected void gridReport_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        string id = "";
        try
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                id = gridReport.DataKeys[e.Row.RowIndex].Value.ToString();

                GridView gvGauges = e.Row.FindControl("Grid_YEAR") as GridView;
                DataTable dt_years = getdata(string.Format("SELECT * FROM tbl_sales_parts where sales_id={0} and sale_part_id='{1}'", id, id + "_" + e.Row.RowIndex));
                if (dt_years.Rows.Count > 0)
                {
                    gvGauges.DataSource = dt_years;
                    gvGauges.DataBind();
                }

                GridView Grid_RM = e.Row.FindControl("Grid_YEAR") as GridView;

                DataTable dt_RM = getdata(string.Format("SELECT *  FROM tbl_RM where sale_id={0} and sale_part_id='{1}'", id, id + "_" + e.Row.RowIndex));

                if (dt_RM.Rows.Count > 0)
                {

                    Grid_RM.DataSource = dt_RM;
                    Grid_RM.DataBind();
                }

            }
        }
        catch (Exception ex)
        {
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "message", "$.prompt('" + ex.Message + "ïd - " + id + "')", true);
        }
    }

but I am getting only 2nd child grid i.e "Grid_RM" is getting bind and its overwriting first child i.e "grid_year" grid columns.  and as some of column names need to generate dynamically I created grids with coloumnautogenerate set true.
UPDATED 
previously was initializing same grid to times so it getting Overwriting. by the help of @Tim Schmelter get the solution. 
updated code as follows - 
protected void gridReport_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        string id = "";
        try
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                id = gridReport.DataKeys[e.Row.RowIndex].Value.ToString();

                GridView gvGauges = e.Row.FindControl("Grid_YEAR") as GridView;
                DataTable dt_years = getdata(string.Format("SELECT * FROM tbl_sales_parts where sales_id={0} and sale_part_id='{1}'", id, id + "_" + e.Row.RowIndex));
                if (dt_years.Rows.Count > 0)
                {
                    gvGauges.DataSource = dt_years;
                    gvGauges.DataBind();
                }

                GridView Grid_RM = e.Row.FindControl("Grid_RM") as GridView;

                DataTable dt_RM = getdata(string.Format("SELECT *  FROM tbl_RM where sale_id={0} and sale_part_id='{1}'", id, id + "_" + e.Row.RowIndex));

                if (dt_RM.Rows.Count > 0)
                {

                    Grid_RM.DataSource = dt_RM;
                    Grid_RM.DataBind();
                }

            }
        }
        catch (Exception ex)
        {
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "message", "$.prompt('" + ex.Message + "ïd - " + id + "')", true);
        }
    }

A:

You are initializing different gridviews(gvGauges and Grid_RM) from the same reference e.Row.FindControl("Grid_YEAR").
Instead you want:
GridView gvGauges = e.Row.FindControl("Grid_YEAR") as GridView;
// ...
GridView Grid_RM = e.Row.FindControl("Grid_RM") as GridView;

