Sorry for asking such simple think but for some reasons I am not coming right.
I have a dropdownList that gets populated with the table names:
public void FillDropDownList(string connString)
String Query = "SELECT * FROM information_schema.tables where Table_Name like 'Table%'";
using (var cn = new SqlConnection(connString))
DataTable dt = new DataTable();
SqlCommand cmd = new SqlCommand(Query, cn);
SqlDataReader myReader = cmd.ExecuteReader();
catch (SqlException e)
radDropDownList1.DataSource = dt;
radDropDownList1.ValueMember = "TABLE_NAME";
radDropDownList1.DisplayMember = "TABLE_NAME";
On selectedIndexChanged of the DropDownList I need to fill in the GridView preserving all functionalities (add, update, delete). Basically the table gets choose at runtime. I am not coming right with this and I would appreciate if can point me to a solution or give me a snippet for this.