The top most issue in web applications is to present a huge amount of data. For my sample I had to display the schedule of .net development courses. A classic master detail scenario. If you place that on a webform the complete place is not used. A popup will solve that. The goal is to solve that without JScript only using AJAX features. After investigating I figured out three possibility's
- HoverExtender
- HoverMenuExtender static
- HoverMenuExtender with callback for each row
I have solved it in all three ways and the hovermenuextener static is the best. The solution is without code.
1.) create a repeater ( or whatever)
2.) the Table row must have a server attribute and a ID (reihe)
3.) place a panel in a cell of that row
4.) put a hidden field in it to use it as control source for the detail grid
5.) put a repeater and sqldatasource into the panel with a controlparamter pointing to the hidden field
6.) extend the table row with a hovermenuextender which is placed otside the row of the Master grid but inside the itemtemplate
<ItemTemplate> <tr runat="server" id="reihe"> <td ><a href=<%#eval("url") %>><%#eval("title") %></a></td> <td align=right><%#Replace(Eval("dauer"), "Tage", "")%></td> <td align=right><%#Eval("preis", "{0:c}")%></td> <td></td> <td> <asp:Panel ID="pnlTermine" runat="server" Width="250px" CssClass="popupPanel" GroupingText="Termine"> <asp:HiddenField ID="HiddenField1" runat="server" Value=<%#eval("seid") %> />
<asp:Repeater ID="rptDetails" EnableViewState=false runat=server DataSourceID="DSKursTermine"> <ItemTemplate> <b><%# switch(eval("ort")) %></b> <%
#eval("termin","{0:dd}") %>.<%#eval("termin","{0:MMM}") %> </ItemTemplate> </asp:Repeater> ....
<ajaxToolkit:HoverMenuExtender runat=server ID="popup1" PopupControlID="pnlTermine" TargetControlID="reihe" PopupPosition=Right OffsetX=-100 HoverCssClass="popupHover" PopDelay=25 > </ajaxToolkit:HoverMenuExtender> </ItemTemplate> ....