4
Answers

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

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)
0
eksypnos123

eksypnos123

NA 65 0 20y
Much easier to create an insert command object and then run it using executeNonQuery() You just set the value for the Name, ID will be handled by the database. and by the way, this is C# forum, so what's this Dim overthere?