I think that you have 2 options;
you either want the detail view in a div, and have it appear / disappear in place, which will use javascript and dhtml
Or you add the detail view programatically, in one of the cells.
(I'd prefer the first method, as suddenly inserting a detail view into the gridview will change the layout of the page. In addition to that, you already have the code to display the detail view. However, if it appears in a div, then it could obscure some of the gridview, whilst inserting the detail view into the gridview wont)
Think about how you'd like to proceed, as it will be easier to decide on a course of action now, than to try both later on..