infragistics how to get the cursor in specific cell

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top