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:
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.
Thanks
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)) { cn.Open(); DataTable dt = new DataTable(); try { SqlCommand cmd = new SqlCommand(Query, cn); SqlDataReader myReader = cmd.ExecuteReader(); dt.Load(myReader); } catch (SqlException e) { //TODO } 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.
Thanks
