Asp.net dropdownlist prob

Hello guys, below my code always return value at index 0 for the dropdown list. not sure why.


 try
            {
                BindIndicator_default();
                DropDownList ddlIndicator = (DropDownList)dataGridView.HeaderRow.FindControl("ddlIndicator");
                string selectedValue = ddlIndicator.SelectedValue.ToString();

                if (selectedValue != "" && selectedValue != "default")
                {
                    BindIndicator(selectedValue);
                }
            }
            catch (Exception ex)
            {
                MessageBoxShow(this, ex.Message.ToString());
            }

This is the aspx part


 <HeaderTemplate> Indicator<br /> 
                <asp:DropDownList name="DDList" ID="ddlIndicator" runat="server" OnSelectedIndexChanged = "DropDownList1_SelectedIndexChanged" AutoPostBack = "true" AppendDataBoundItems = "true">
                    <asp:ListItem Text = "Default" Value = "default"></asp:ListItem>
                    <asp:ListItem Text = "First 10" Value = "WIP"></asp:ListItem>
                </asp:DropDownList>
                </HeaderTemplate>

You shouldn’t need to work your way through the .NET controls in order to retrieve the selected option value, you should only need to use the following.

try
{
    BindIndicator_default();
    
    // Get the selected option value
    string selectedValue = ddlIndicator.SelectedValue;

    if (!string.IsNullOrEmpty(selectedValue) && selectedValue != "default")
    {
        BindIndicator(selectedValue);
    }
}
catch (Exception ex)
{
    MessageBoxShow(this, ex.Message.ToString());
}