or
<telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" DataSourceID="edsMainGrid"
...
<asp:EntityDataSource ID="edsMainGrid" runat="server"
OnContextCreating="edsMainGrid_ContextCreating"
EntitySetName="myCollection">
</asp:EntityDataSource>
Protected Sub edsMainGrid_ContextCreating(sender As Object, e As EntityDataSourceContextCreatingEventArgs)
Dim ctx As myEntities = myEntities()
e.Context = TryCast(ctx, IObjectContextAdapter).ObjectContext
End Sub
<html xmlns="http://www.w3.org/1999/xhtml" height="100%"> <head runat="server"> <title>未命名頁面</title> <style type="text/css"> html, body, form { height: 100%; margin: 0px; padding: 0px; overflow: hidden; } </style> </head> <body scroll="no" height="100%"> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager" runat="server" /> <div id="ParentDivElement" style="height: 100%;"> <telerik:RadSplitter ID="MainSplitter" runat="server" Height="100%" Width="100%" Orientation="Horizontal" Skin="Outlook"> <telerik:RadPane ID="TopPane" runat="server" Height="100" MinHeight="85" MaxHeight="150" Scrolling="Both"> </telerik:RadPane> <telerik:RadSplitBar ID="RadsplitbarTop" runat="server" CollapseMode="Forward" /> <telerik:RadPane ID="MainPane" runat="server" Scrolling="none" MinWidth="500"> <telerik:RadSplitter ID="NestedSplitter" runat="server" Skin="Outlook" LiveResize="true"> <telerik:RadPane ID="LeftPane" runat="server" Width="200" MinWidth="150" MaxWidth="400"> <!-- Place the content of the pane here --> </telerik:RadPane> <telerik:RadSplitBar ID="VerticalSplitBar" runat="server" CollapseMode="Forward" /> <telerik:RadPane ID="ContentPane" runat="server"> <!-- Place the content of the pane here --> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td> <telerik:RadMenu ID="mBar" Runat="server" Skin="Office2007" Width="100%"> <Items> <telerik:RadMenuItem runat="server" Text="Root RadMenuItem1"> </telerik:RadMenuItem> </Items> <CollapseAnimation Duration="200" Type="OutQuint" /> </telerik:RadMenu> </td> </tr> </table> </telerik:RadPane> </telerik:RadSplitter> </telerik:RadPane> </telerik:RadSplitter> </div> </div> </form> </body> </html> 