本文整理汇总了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;
}
}
示例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;
}
示例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;
}
}
示例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;
}
}
示例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();
}
示例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();
}
示例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;
}
}
示例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();
}
示例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;
}
示例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;
}
示例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();
}
示例12: PressEnter
//SimpleButton
public void PressEnter(KeyPressEventArgs e, DevExpress.XtraEditors.SimpleButton sb)
{
if (e.KeyChar == (char)Keys.Enter)
{
e.Handled = true;
sb.Focus();
}
}