How to auto-select a newly added row in the DataGrid?

Apr 22 2010 9:46 AM
I want to be able to programatically select a newly added row that was added in another screen and not directly in the Grid. So the user can have a visual reference that a post was successful.

I found this answer here:

http://www.akadia.com/services/dotnet_find_methods.html

but it requires your tables to have primary keys and just my luck none of my tables have primary keys. By the way I didn't create these tables. How do I do the find without primary keys? I don't want to have to add them to all my Tables. My tables do have Unique Identity columns and I use the "select scope_identity()..." to return the new ID but I am unable to use this new ID the select it from the Grid.

Answers (4)