I want to fetch value from dropdownlist when selected. On that selection of value I am firing a simple select query ie.
"select * from Category where cat_name ='" + dropdownlistselectedvalue + "'"
here is the code of needDatasource
protected void rdgridview_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
if (!e.IsFromDetailTable)
{
//I want to fetch the dropdownlist selected value here ie
string dpvalue = DropDownList1.SelectedValue.ToString();
string strqry = "select * from Categories where Category_Name = '"+ dpvalue +"'";
rdgridview.DataSource = getDataTable(strqry);
}
}
But I am not able to fetch the value from the dropdownlist selected value in needDatasource method. How shall I fetch the value or fire any event of dropdownlist control?
Thanks in advance