user control grid with dropdown
-
Dear all, here i have done a grid node like user control for displaying the items in each and every page in that grid i have a dropdown list for selecting the feature of the item . here i has to fetch the fetch the feature from database and based upon that i has to display. the below i had written but it is not working so please help me Thanks and Regards protected void gridnode1_SelectedIndexChanged(object sender, EventArgs e) { dsfeature = con.GiveDataSet("select features from b2bpattributes ,b2bproducts where b2bpattributes.productgroup in (select productgroup from b2bproducts where productid='" + str2 + "') and b2bpattributes.productid=b2bproducts.productid and b2bproducts.available='Online'"); //select features from b2bpattributes where productgroup in (select productgroup from b2bproducts where productid='" + str2 + "' and available='Online')"); if (dsfeature.Tables[0].Rows[0]["features"].ToString() != "") { if (dsfeature.Tables[0].Rows.Count != 1) { //lblfeature.Visible = false; ddlfeature1.DataSource = dsfeature; ddlfeature1.DataTextField = "features"; ddlfeature1.DataBind(); } else { //lblfeature.Visible = true; lblfeature.Text = dsfeature.Tables[0].Rows[0]["features"].ToString(); ddlfeature1.Visible = false; //lblselect.Visible = false; } } else { ddlfeature1.Visible = false; //lblselect.Visible = false; } }
sai krishna