当前位置: 首页>>代码示例>>C#>>正文


C# DevExpress.Focus方法代码示例

本文整理汇总了C#中DevExpress.Focus方法的典型用法代码示例。如果您正苦于以下问题:C# DevExpress.Focus方法的具体用法?C# DevExpress.Focus怎么用?C# DevExpress.Focus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DevExpress的用法示例。


在下文中一共展示了DevExpress.Focus方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FocusAndExpandToNode

 public void FocusAndExpandToNode(DevExpress.Web.ASPxTreeList.TreeListNode node)
 {
     node.Focus();
     node.Expanded = true;
     while (node.ParentNode != null)
     {
         node = node.ParentNode;
         node.Expanded = true;
     }
 }
开发者ID:quocdunginfo,项目名称:QuanLyTaiSan,代码行数:10,代码来源:ucTreeViTri.ascx.cs

示例2: CheckNullControl

        public bool CheckNullControl(DevExpress.XtraEditors.LookUpEdit pControl, string pLabelText)
        {
            pLabelText = pLabelText.Replace("(*)", "");

            if (pControl.EditValue == null || pControl.EditValue.ToString().Trim().Length == 0)
            {
                MessageBox.Show(this, "Vui lòng nhập " + pLabelText + "'", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
                pControl.Focus();
                return false;
            }
            return true;
        }
开发者ID:vanloc0301,项目名称:hugate-parking,代码行数:12,代码来源:frmBaseAdd.cs

示例3: isDatePresent

 //Check is Combo Present 
 public bool isDatePresent(DevExpress.XtraEditors.DateEdit DateEditor, string name)
 {
     if (string.IsNullOrEmpty(DateEditor.Text))
     {
         DevExpress.XtraEditors.XtraMessageBox.Show(name + " is a requierd field", "Entry error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         DateEditor.Focus();
         return false;
     }
     else
     {
         return true;
     }
 }
开发者ID:nuwanprabath,项目名称:ITRACK,代码行数:14,代码来源:Validator.cs

示例4: isNumaricPresent

 //Check is Combo Present 
 public bool isNumaricPresent(DevExpress.XtraEditors.CalcEdit combobox, string name)
 {
     if (string.IsNullOrEmpty(combobox.Text))
     {
         DevExpress.XtraEditors.XtraMessageBox.Show(name + " is a requierd field", "Entry error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         combobox.Focus();
         return false;
     }
     else
     {
         return true;
     }
 }
开发者ID:nuwanprabath,项目名称:ITRACK,代码行数:14,代码来源:Validator.cs

示例5: SetAlertTextMemo

 public static void SetAlertTextMemo(Control page, string msg, DevExpress.Web.ASPxEditors.ASPxMemo Memo, string key = "Validation")
 {
     ScriptManager.RegisterStartupScript(page, typeof(string), key, "alert('" + msg + "');", true);
     Memo.Focus();
 }
开发者ID:TIT-tech,项目名称:OPM_BO,代码行数:5,代码来源:OPM_BL.cs

示例6: focusFormsItem

 private void focusFormsItem(object objMessageID, DevExpress.XtraEditors.BaseEdit xle)
 {
     UIMessage.ShowMessage(objMessageID, System.Windows.Forms.MessageBoxButtons.OK,
         System.Windows.Forms.MessageBoxIcon.Warning);
     xle.Focus();
 }
开发者ID:puentepr,项目名称:thuctapvietinsoft,代码行数:6,代码来源:GeneralInformation.cs

示例7: moveTargetRow

 public static bool moveTargetRow(DevExpress.XtraGrid.GridControl xgc,DataRow drTarget, string sKeyField)
 {
     try
     {
         DataView dv = null;
         if (xgc.DataSource is DataTable)
         {
             dv = ((DataTable)xgc.DataSource).DefaultView ;
         }
         else
             dv = (DataView)xgc.DataSource;
         DevExpress.XtraGrid.Views.Grid.GridView xgv = (DevExpress.XtraGrid.Views.Grid.GridView)xgc.DefaultView;
         int nRowHandle;
         for (nRowHandle = 0; nRowHandle < dv.Count; nRowHandle++)
         {
             DataRow drTemp = xgv.GetDataRow(nRowHandle);
             if (drTemp != null)
             {
                 if ( drTarget[sKeyField].Equals(drTemp[sKeyField]))
                 {
                     xgc.Focus();
                     xgv.ClearSelection();
                     xgv.FocusedRowHandle = nRowHandle;
                     xgv.SelectRow(nRowHandle);
                     return true;
                 }
             }
         }
         return false;
     }
     catch (Exception)
     {
         return false;
     }
 }
开发者ID:puentepr,项目名称:thuctapvietinsoft,代码行数:35,代码来源:Definition.cs

示例8: SetAlertRadioButton

 public static void SetAlertRadioButton(Control page, string msg, DevExpress.Web.ASPxEditors.ASPxRadioButton rd, string key = "Validation")
 {
     ScriptManager.RegisterStartupScript(page, typeof(string), key, "alert('" + msg + "');", true);
     rd.Focus();
 }
开发者ID:TIT-tech,项目名称:OPM_BO,代码行数:5,代码来源:OPM_BL.cs

示例9: focusRowHandle

        //public static bool moveTargetGroup(DevExpress.XtraGrid.GridControl xgc,DataRow drTarget, string sKeyField)
        //{
        //    try
        //    {
        //        DataView dv = null;
        //        if (xgc.DataSource is DataTable)
        //        {
        //            dv = ((DataTable)xgc.DataSource).DefaultView ;
        //        }
        //        else
        //            dv = (DataView)xgc.DataSource;
        //        DevExpress.XtraGrid.Views.Grid.GridView xgv = (DevExpress.XtraGrid.Views.Grid.GridView)xgc.DefaultView;
        //        int nRowHandle = 0;
        //        // for (nRowHandle = 0; nRowHandle < dv.Count; nRowHandle++)
        //        while (nRowHandle < dv.Count)
        //        {
        //            if (!xgv.IsGroupRow(nRowHandle))
        //            {
        //                // get parent's row :
        //                int nParentRowHandle = xgv.GetParentRowHandle(nRowHandle);
        //                // get the number of child rows:
        //                int nChildRows = xgv.GetChildRowCount(nParentRowHandle);
        //                // get dislay value of group row :
        //                string sGroupDisplayValue = xgv.GetRowGroupDisplayText(nParentRowHandle);
        //                int nTokenPos = sGroupDisplayValue.IndexOf(":");
        //                sGroupDisplayValue = sGroupDisplayValue.Substring(nTokenPos+1,sGroupDisplayValue.Length - nTokenPos - 1).Trim();
        //                // compare :
        //                if (drTarget[sKeyField].ToString() == sGroupDisplayValue)
        //                {
        //                    xgc.Focus();
        //                    xgv.ClearSelection();
        //                    xgv.FocusedRowHandle = nParentRowHandle;
        //                    xgv.SelectRow(nParentRowHandle);
        //                    // expand all child rows :
        //                    xgv.SetRowExpanded(nParentRowHandle,true);
        //                    return true;
        //                }
        //                // move to child row of next group :
        //                nRowHandle = nRowHandle + nChildRows;
        //            }
        //        }
        //        return false;
        //    }
        //    catch (Exception)
        //    {
        //        return false;
        //    }
        //}
        public static void focusRowHandle(DevExpress.XtraGrid.GridControl xgc, int iFocusedRowHandle)
        {
            xgc.Focus();
            DevExpress.XtraGrid.Views.Grid.GridView xgv = (DevExpress.XtraGrid.Views.Grid.GridView)xgc.DefaultView;

            // clear old selection
            xgv.ClearSelection();
            // set focused:
            xgv.SelectRow(iFocusedRowHandle);
            xgv.FocusedRowHandle = iFocusedRowHandle;
        }
开发者ID:puentepr,项目名称:thuctapvietinsoft,代码行数:59,代码来源:Definition.cs

示例10: deleteSelectedRow

        public static bool deleteSelectedRow(DevExpress.XtraGrid.GridControl xgc,DevExpress.XtraGrid.Views.Grid.GridView xgv, object objMessageID)
        {
            if (xgv == null) return false;

            DataRow dr=null;
            try
            {
                dr = (DataRow)xgv.GetDataRow(xgv.FocusedRowHandle);
                if (dr != null)
                {
                    dr.Delete();
                }
                else
                {
                    UIMessage.ShowMessage(objMessageID ,System.Windows.Forms.MessageBoxButtons.OK,
                        System.Windows.Forms.MessageBoxIcon.Exclamation );
                    xgc.Focus();
                }
            }
            catch(Exception e)
            {
                throw new Exception(e.Message );
            }
            return true;
        }
开发者ID:puentepr,项目名称:thuctapvietinsoft,代码行数:25,代码来源:Definition.cs

示例11: SetAlertCheckbox

 //public static void SetAlertTextDate(Control page, string msg, DevExpress.Web.ASPxEditors.ASPxDateEdit txt, string key = "Validation")
 //{
 //    ScriptManager.RegisterStartupScript(page, typeof(string), key, "alert('" + msg + "');", true);
 //    txt.Focus();
 //}
 public static void SetAlertCheckbox(Control page, string msg, DevExpress.Web.ASPxEditors.ASPxCheckBox chk, string key = "Validation")
 {
     ScriptManager.RegisterStartupScript(page, typeof(string), key, "alert('" + msg + "');", true);
     chk.Focus();
 }
开发者ID:TIT-tech,项目名称:OPM_BO,代码行数:10,代码来源:OPM_BL.cs

示例12: PressEnter

 //SimpleButton
 public void PressEnter(KeyPressEventArgs e, DevExpress.XtraEditors.SimpleButton sb)
 {
     if (e.KeyChar == (char)Keys.Enter)
     {
         e.Handled = true;
         sb.Focus();
     }
 }
开发者ID:carmasm,项目名称:SAPPYME,代码行数:9,代码来源:frmBase.cs


注:本文中的DevExpress.Focus方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。