SPDataSource for update and delete
Has anyone tried out 开发者_运维百科working with the Delete and update command of SPDataSource used in conjunction with SPGridView? If yes, can you share a working example?
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)
精彩评论