componentart--clientmode-editing

 


**********************************************************************************************************
//.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" 是对应的
但是链接至死都不肯出来!!!!!!!!

posted on 2007-09-08 17:07  simhare  阅读(699)  评论(0编辑  收藏  举报

导航