G
Guest
Hi everybody,
im working in infragistics ultragrid.
Can any one know how to get the cursor in to active cell .
i need to check the empty field before leaving cell.
if its empty then cursor should be forced to come into the empty field.
ive tried in beforedeactivecell event but the cursor is not coming to the
empty field when i changed the cursor to another cell.
below is my code
***
//function returns bool if cell is empty
chekemfield =checkemptyfield();
if(chekemfield ==true)
{
MessageBox.Show("Field must be
entered","V-1550",System.Windows.Forms.MessageBoxButtons.OK,System.Windows.Forms.MessageBoxIcon.Error);
ultraGrid1.ActiveRow=ultraGrid1.Rows[actrowinx];
Infragistics.Win.UltraWinGrid.UltraGridCell acell;
acell = ultraGrid1.ActiveRow.Cells["INSULATION_DUTY"];
ultraGrid1.ActiveCell = acell;
ultraGrid1.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode);
//function
public bool checkemptyfield()
{
string duty=ultraGrid1.ActiveRow.Cells["INSULATION_DUTY"].Value.ToString();
string
material=ultraGrid1.ActiveRow.Cells["INSULATION_MATERIAL"].Value.ToString();
if(duty==string.Empty || material==string.Empty)
{
chekemfield=true;
return chekemfield;
}
else
{
chekemfield=false;
return chekemfield;
}
}
****
can anyone help me
im working in infragistics ultragrid.
Can any one know how to get the cursor in to active cell .
i need to check the empty field before leaving cell.
if its empty then cursor should be forced to come into the empty field.
ive tried in beforedeactivecell event but the cursor is not coming to the
empty field when i changed the cursor to another cell.
below is my code
***
//function returns bool if cell is empty
chekemfield =checkemptyfield();
if(chekemfield ==true)
{
MessageBox.Show("Field must be
entered","V-1550",System.Windows.Forms.MessageBoxButtons.OK,System.Windows.Forms.MessageBoxIcon.Error);
ultraGrid1.ActiveRow=ultraGrid1.Rows[actrowinx];
Infragistics.Win.UltraWinGrid.UltraGridCell acell;
acell = ultraGrid1.ActiveRow.Cells["INSULATION_DUTY"];
ultraGrid1.ActiveCell = acell;
ultraGrid1.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode);
//function
public bool checkemptyfield()
{
string duty=ultraGrid1.ActiveRow.Cells["INSULATION_DUTY"].Value.ToString();
string
material=ultraGrid1.ActiveRow.Cells["INSULATION_MATERIAL"].Value.ToString();
if(duty==string.Empty || material==string.Empty)
{
chekemfield=true;
return chekemfield;
}
else
{
chekemfield=false;
return chekemfield;
}
}
****
can anyone help me