Dear All,
i had a problem in data field not found on the select data source.
Kindly advise, thank you.

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<form id="form1">
<div>
Country:
<asp:DropDownList ID="ddlCountry" AutoPostBack="true" runat="server">
<asp:ListItem Text="CS-Others" Value="CS-Others" />
<asp:ListItem Text="CS-IDM" Value="CS-IDM" />
<asp:ListItem Text="Chemical" Value="Chemical" />
<asp:ListItem Text="SP" Value="SP" />
<asp:ListItem Text="CS-5S" Value="CS-5S" />
<asp:ListItem Text="CS-PPE" Value="CS-PPE" />
<asp:ListItem Text="CS-HT" Value="CS-HT" />
<asp:ListItem Text="DM" Value="DM" />
</asp:DropDownList>
<br />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false">
<Columns>
<asp:BoundField DataField= "ROW_NUMBER" HeaderText="ROW_NUMBER" />
<asp:BoundField DataField= "INV_ID" HeaderText="INV_ID" />
<asp:BoundField DataField= "INV_TYPE" HeaderText="INV_TYPE" />
</Columns>
</asp:GridView>
</div>
</form>
</asp:Content>
protected void Page_Load(object sender, EventArgs e)
{
string conString = ConfigurationManager.ConnectionStrings["CIMProRPT01ConnectionString"].ConnectionString;
string query = "SELECT ROW_NUMBER() OVER (Order by A.INV_ID,A.INV_TYPE,A.INV_SHORTDESC,B.INV_LOCATION,B.INV_QTY) AS RowNumber,A.INV_ID,A.INV_TYPE,A.INV_SHORTDESC,B.INV_LOCATION,B.INV_QTY FROM CIMProRPT01.dbo.OTH_INV_DETAILS A JOIN CIMProRPT01.dbo.OTH_INV_QTY_LOC B ON A.INV_ID = B.INV_ID WHERE 1=1 and A.INV_TYPE =@INV_TYPE ORDER BY A.INV_ID,A.INV_TYPE,B.INV_LOCATION";
SqlCommand cmd = new SqlCommand(query);
cmd.Parameters.AddWithValue("@INV_TYPE", ddlCountry.SelectedItem.Value);
using (SqlConnection con = new SqlConnection(conString))
{
using (SqlDataAdapter sda = new SqlDataAdapter())
{
cmd.Connection = con;
sda.SelectCommand = cmd;
using (DataSet ds = new DataSet())
{
sda.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
}
}
}
}
}
}