Ext 随笔

/-------------------------
//清空panel等后面空白属性
//-------------------------

baseCls:"x-plain"

//-------------------------
//有关于是否button
//-------------------------

Ext.Msg.confirm("提示", "你确定要删除该用户吗?", function (button) {
if (button == "yes") {
}

//-------------------------
//获取grid中的选中行 并且从行中取出元素
//-------------------------

CellSelectionModel sm = this.GridPanel1.SelectionModel.Primary as CellSelectionModel;//qq群:Ext .Net(146909096);
this.Label1.Html = string.Format("RecordID: {0}<br />Name: {1}<br />Value: {2}<br />Row: {3}<br />Column: {4}", sm.SelectedCell.RecordID, sm.SelectedCell.Name, sm.SelectedCell.Value, sm.SelectedCell.RowIndex.ToString(), sm.SelectedCell.ColIndex.ToString());

//-------------------------
//Ext调用后台方法
//-------------------------
Ext.net.DirectMethods.RowUpdateChange

//-------------------------
//刷新form
//-------------------------
<Click Handler="#{BasicForm}.getForm().reset();" />

<Click Handler="#{FormPanel1}.getForm().reset();" />

//-------------------------
//sql多表联查
//-------------------------
select  * from tablea inner join tableb on tablea.id=tableb.tableaId


//-------------------------
//简单的拖动
//-------------------------
Closable="false"
Resizable="false"
Draggable="false"

可闭=“假“
可调整大小=“假“
可拖动=“假“



//-------------------------
//检查液面存在的错误
//-------------------------

                    <Listeners>
                        <Click Handler="
                            if (!#{txtUsername}.validate() || !#{txtPassword}.validate()) {
                                Ext.Msg.alert('Error','The Username and Password fields are both required');
                                // return false to prevent the btnLogin_Click Ajax Click event from firing.
                                return false; 
                            }" />
                    </Listeners>
                    <DirectEvents>
                        <Click OnEvent="btnLogin_Click">
                            <EventMask ShowMask="true" Msg="Verifying..." MinDelay="500" />
                        </Click>
                    </DirectEvents>


//------------------------
//Ext error事件   
//------------------------
  <Click OnEvent="SaveData" Before="return #{FormPanel1}.isValid();">

//------------------------
//页面背景变色   
//------------------------
Frame="true"

posted on 2014-08-10 22:45  Struggling Rookie  阅读(157)  评论(0编辑  收藏  举报