zoukankan      html  css  js  c++  java
  • componentartclientmodeediting


    **********************************************************************************************************
    //.net 2.0
    0.RunningMode="Client"
    1.OnNeedRebind="Grid1_NeedRebind"
    2.protected void Grid1_NeedRebind(object sender, EventArgs e)
    {
            Grid1.DataBind();
    }
    **********************************************************************************************************
    //.net 1.0
    0.RunningMode="Client"
    1.null
    2.private void InitializeComponent()
    {
     this.Load += new System.EventHandler(this.Page_Load);
     Grid1.NeedRebind += new ComponentArt.Web.UI.Grid.NeedRebindEventHandler(OnNeedRebind);
    }
    3.public void OnNeedRebind(object sender, EventArgs oArgs)
    {
     Grid1.DataBind();
    }
    **********************************************************************************************************
    <input type="button" onclick="Grid1.Table.AddRow()" value="Add row" />,没有runat="server",所以也不可能在cs中,事实也没有!
    最稀奇的是在aspx 页面根本不用写Grid1.Table.AddRow()函数/或AddRow()函数,估计是在
    <%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI" Assembly="ComponentArt.Web.UI" %>时
    固定在了bin下的ComponentArt.Web.UI.dll程序集中.是Grid1.Table中的Grid1指定了在哪个Grid中添加一行.
    **********************************************************************************************************
    承上:
    <ComponentArt:ClientTemplate Id="InsertCommandTemplate">
            <a href="javascript:insertRow();">Insert</a> | <a href="javascript:Grid1.EditCancel();">Cancel</a>
    </ComponentArt:ClientTemplate>

    function insertRow()
    {
        Grid1.editComplete(); //内部集成函数
    }
    而  Grid1.EditCancel()是内部集成的
    -------------这样就确定了"Grid1.Table.AddRow()"触发的AddRow()是什么样子的,:::::还是缺少Insert 和 Cancel 两个链接

    在<Levels></Levels>中间添加了 InsertCommandClientTemplateId="InsertCommandTemplate"还是没有链接::::::
    然后忽然发现在<Levels></Levels>之间还有<Columns></Columns>层级,加入
    <ComponentArt:GridColumn AllowSorting="false" HeadingText="Edit Command" DataCellClientTemplateId="EditTemplate" EditControlType="EditCommand" Width="100" Align="Center" />
    还是没有链接,又发现DataCellClientTemplateId="EditTemplate" 于是又在<ClientTemplates></ClientTemplates>内与Id="InsertCommandTemplate">处于同一级加入:
    <ComponentArt:ClientTemplate Id="EditTemplate">
             <a href="javascript:editGrid('## DataItem.ClientId ##');">Edit</a> | <a href="javascript:deleteRow('## DataItem.ClientId ##')">Delete</a>
    </ComponentArt:ClientTemplate>
    <ComponentArt:ClientTemplate Id="EditCommandTemplate">
             <a href="javascript:editRow();">Update</a> | <a href="javascript:Grid1.EditCancel();">Cancel</a>
    </ComponentArt:ClientTemplate>

    还是没链接出现,问题还没解决,无意中发现:

     <ComponentArt:ClientTemplate Id="LoadingFeedbackTemplate">
              <table cellspacing="0" cellpadding="0" border="0">
              <tr>
                <td style="font-size:10px;">Loading...&nbsp;</td>
                <td><img src="images/spinner.gif" width="16" height="16" border="0"></td>
              </tr>
              </table>
              </ComponentArt:ClientTemplate>
    和<ComponentArt:Grid id="Grid1"  ....> 中的属性 LoadingPanelClientTemplateId="LoadingFeedbackTemplate" 是对应的
    但是链接至死都不肯出来!!!!!!!!

  • 相关阅读:
    struts2简介
    HDU 2842 Chinese Rings(矩阵高速功率+递归)
    Cocos2d-X中国象棋的发展《五岁以下儿童》摆棋
    【Python注意事项】如何理解python中间generator functions和yield表情
    [CSS] Design for Mobile First with Tachyons
    [Angular] Configurable NgModules
    [Angular] Using useExisting provider
    [Angular] Providers and useFactory
    [Angular] Using InjectionToken
    [Angular] Test Directive
  • 原文地址:https://www.cnblogs.com/simhare/p/886806.html
Copyright © 2011-2022 走看看