|
参考官网示例,实现起来并不难:http://fineui.com/demo/#/demo/grid/grid_newtab.aspx
1. 改造SiteNavigation.ascx
- <f:Panel ID="Panel1" runat="server" BodyPadding="0px" ShowBorder="false" ShowHeader="false" Title="Panel">
- <Items>
- <f:Grid ID="GridSieURL" runat="server" Title="常用网站" ShowBorder="False" EnableMultiSelect="False" ShowGridHeader="False" MaxWidth="250px">
- <Columns>
- <f:TemplateField Width="250px">
- <ItemTemplate>
- <a href="javascript:;" onclick="<%# GetEditUrl(Eval("NavigationName"), Eval("NavigationURL")) %>">
- <%# Eval("NavigationName") %>
- </a>
- </ItemTemplate>
- </f:TemplateField>
- </Columns>
- </f:Grid>
- </Items>
- </f:Panel>
复制代码
2. SiteNavigation.ascx.cs增加:
- protected string GetEditUrl(object name, object url)
- {
- JsObjectBuilder joBuilder = new JsObjectBuilder();
- joBuilder.AddProperty("title", "编辑 - " + name.ToString());
- joBuilder.AddProperty("iframeUrl", ResolveUrl(url.ToString()));
- // addExampleTab函数定义在default.aspx
- return String.Format("addExampleTab({0});", joBuilder);
- }
复制代码
3. Default.aspx页面增加 addExampleTab函数:
- // 添加示例标签页
- function addExampleTab(tabOptions) {
- F.addMainTab(F(tabStripClientID), tabOptions);
- }
复制代码
搞定:
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|