I have RadGrid that uses NeedDataSource and it works fine. What I can't figure out in how to do an automatic insert, since the examples I could find do it in the DataSource definition in aspx code.
Can someone point me to an example or a tutorial, please?
The automatic data source operations only work when binding the grid to a declarative data source using the DataSourceID property of the RadGrid. Here is the help documentation and demo which explains more about this. Automatic DataSource Operations. Grid / Automatic Operations.
Rats, I am using NeedDataSource because I am using different SelectMethod's and TypeName's to make a common form taking one data item from various tables. See code below.
I was hoping I could use automatic insert to add new data to the tables.
How would you recommend I do this (with an example please)?
private void chooseDataMethods ()
{
if (!String.IsNullOrWhiteSpace (Request.QueryString["list"]))
{
ObjectDataSource DataSource1 = new ObjectDataSource ();
Automatic Insert/Delete/Update is only possible for Declarative DataSource. In case of NeedDataSource you can explicitly write the queries for Insert/update/Delete operations. You can take a look into the following documentation