Can you access the data in a SQLDataSource
I want to know if you can programetically access and change the data in a SQLDataSource object. I have a gridview which uses a SQLDataSource object as its back end. It automatically implements editing, inserting, deleting, sorting and paging. I love it.
Now I've got a button control in each row of the GridView that will require a custom event handler and I'll need to edit the actual dataRow behind the GridViewRow in that handler, and don't see any methods of the SQLDataSource object that return DataRows. Is this not possible? Do I need to create a separate dataset for this?
If you want more information, here it is. This is a CMS for an Image Gallery. The owner of the site would like to be able to re-order the images in her gallery. I created an OrderOfAppearance field in the SQL Server table, and I thought about just using text boxes, where the user can enter in integers to re-order the way the pictures appear, but then I thought how much cooler it would be if there were a Move Up and Move Down button in every row. But to do that I need access to the backend data store. Rather than sending individual UPDATE queries to the database, then refreshing the SQLDataSource object, I'd like to just change the SQLDataSource directly. Is that possible?