views:

140

answers:

1

Hi All,

Has any now tried out working with Delete and update command of SPDataSource used in conjuction with SPGridView? If yes, can you share a working example?

Thanks, Taha

A: 

There is no way to do this without code. It specifies the query used to first retrieve the item(s) to be deleted, you in turn should add a handler for deleting the items the DeleteCommand retrieves in code.... I know, not very clean, but the SPDataSource is basically only useable for selecting items... CAML is a retrieval only language, it itself does not have any Command either (i.e. SELECT is implicit, DELETE, INSERT UPDATE do not exist in CAML)

Colin