How to collapse and expand devexpress master/detail asp.net gridview-Collection of common programming errors
First assign clientInstanceName to grid as:
When you complete update or delete as you said call grid.CollapseAllDetailRows();
after the operation that you have completed. or on ASPxClientGridView.DetailRowExpanding Event set the expanded detail row visibleindex
. check the following code snippet and code as per your requirement.
var focusedIndex;