當前我正在使用GridView和GridView的RowCommand事件,所選行的詳細信息顯示在Gridview下方。但現在我必須在點擊的行下方顯示細節。意味着它將顯示在所選行和下一行之間。 GridView的代碼是是否有可能在GridView行之間顯示RowCommand事件
<asp:GridView ID ="gvUserDataReadOnly" AutoGenerateColumns ="false" runat ="server" OnRowCommand ="gvUserDataReadOnly_RowCommand" DataKeyNames ="Guid">
<Columns >
<asp:ButtonField ItemStyle-Width ="100px" DataTextField ="FirstName" HeaderText ="<%$ Resources:StringsRes,pge_ContactManager_FirstName %>" SortExpression ="FiratName" CommandName ="show_Details" ButtonType ="link" />
<asp:ButtonField ItemStyle-Width ="100px" DataTextField ="LastName" HeaderText ="<%$ Resources:StringsRes,pge_ContactManager_LastName %>" SortExpression ="LastName" CommandName ="show_Details" ButtonType ="link" />
<asp:BoundField ItemStyle-Width ="100px" DataField ="TypeName" HeaderText ="<%$ Resources:StringsRes,pge_ContactManager_TypeName %>" SortExpression ="TypeId" />
</Columns>
<RowStyle Height="25px" />
<HeaderStyle Height="30px"/>
</asp:GridView>
和div標籤,我想速滑運動員的肌肉行顯示的是
<div id ="dvUserDatails" runat ="server" visible ="false" class ="eventcontent">
<h2><asp:Literal ID ="ltUserName" runat ="server" ></asp:Literal></h2>
<asp:Label Text ="Type : " runat ="server" ID ="Type"></asp:Label><asp:Literal ID ="ltType" runat ="server" ></asp:Literal><br />
<asp:Label Text ="Address : " runat ="server" ID ="Address"></asp:Label><asp:Literal ID ="ltAddress" runat ="server" ></asp:Literal><br />
<asp:Label Text ="Phone No : " runat ="server" ID ="PhoneNo"></asp:Label><asp:Literal ID ="ltPhoneNo" runat ="server" ></asp:Literal><br />
<asp:Label Text ="Mobile No : " runat ="server" ID ="MobNo"></asp:Label><asp:Literal ID ="ltMobNo" runat ="server" ></asp:Literal><br />
<asp:Label Text ="Email Id : " runat ="server" ID ="emailId"></asp:Label><asp:Literal ID ="ltemail" runat ="server" ></asp:Literal><br />
</div>
,因爲我沒有使用的GridView的編輯按鈕,我不能使用EditItem模板。任何人都可以告訴我如何完成這項任務?任何其他方式來做到這一點?提前致謝。
謝謝......這真是非常有幫助......它解決了我的問題.. – 2009-02-17 09:54:31