I've figured out how to create a RadGrid in batch edit mode, and I've figured out how to change the RadGrid's datasource from a DropDownList of table names... but I'm having trouble combining the two.
Once I switch from a hard-coded datasource (a single table) to the dynamic one, I lose the ability to automatically update/insert/delete. But I can't realistically manually create CRUD operations for the hundreds of tables in my DropDownList.
Is there a way to use the command parameter to control the table? I tried it like this, but it doesn't work:
Once I switch from a hard-coded datasource (a single table) to the dynamic one, I lose the ability to automatically update/insert/delete. But I can't realistically manually create CRUD operations for the hundreds of tables in my DropDownList.
Is there a way to use the command parameter to control the table? I tried it like this, but it doesn't work:
<
asp:SqlDataSource
ID
=
"SqlDataSource1"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:MyConnectionString %>" SelectCommand="SELECT * FROM @Table">
<
SelectParameters
>
<
asp:ControlParameter
ControlID
=
"DropDownList1"
Name
=
"Table"
PropertyName
=
"SelectedValue"
Type
=
"String"
/>
</
SelectParameters
>