in
Forums
Blogs
Files
Devexpress.Com
ClientCenter
Support Center
DevExpress Channel

Weird behaviour in event

Last post 8/21/2008 2:21 PM by Juan Betancourt. 0 replies.
Page 1 of 1 (1 items)
Sort Posts:
Previous Next
  • 8/21/2008 2:21 PM

    Weird behaviour in event

    I have a XtraGrid binded to an objectset; after to have added several rows, not matter

    how many, always that i press <Esc> (twice), WITH THE FOCUS in the NewInitRow

    (FocusedRowHandle < 0), at the second time of pressing <Esc> the last

    row recently added (row=rowcount-1) is deleted. After debugging, i found

    the line of code problem:

     

    private void advBandViewRGD_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
    {
                if (e.KeyCode == Keys.Escape && advBandViewRGD.ActiveEditor == null)
                {

                    //THE FOLLOWING LINE IS GUILTY:
                    advBandViewRGD.CancelUpdateCurrentRow();
                    advBandViewRGD.FocusedRowHandle = prevRowHandle;
                }

               ......

     

    }

     

    Why occurs this? Which is the solution?

    Thanks in advance

     

Page 1 of 1 (1 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED