Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
955
In which event to write below code ?
posted

There is four columns in the ultraGrid,and the fourth column is binded with a ultraDropDown, below the is code:

          if (this.ultraGrid1.ActiveCell.Column.Index == 3 && this.ultraGrid1.ActiveCell.Row.Index == this.ultraGrid1.Rows.Count - 1)
                {
                    Infragistics.Win.UltraWinGrid.UltraGridRow row = this.ultraGrid1.ActiveRow;
                    if (row.Cells[0].Value != "" && row.Cells[1].Value != "" && row.Cells[3].Value != "")
                        this.ultraGrid1.Rows.Band.AddNew();
                }

 

When the current cell is the last row and the last column and the value of column1 column2 and column3 is not empty, then I'd like to add new row.  but I don't know in which event to write the code. I write it in AfterCellUpdate or  AfterCellListCloseUp or  AfterSelectChange. it doesn't work fine.

 

Many thanks in advance!

 

  • 955
    posted

    Dear Arun:

          Did as you told, After finishing choosing value of the last column, it doesn't execute "this.ultraGrid1.Rows.Band.AddNew();"  when I move out  mouse from this column, then it execute "this.ultraGrid1.Rows.Band.AddNew();" 

      Now I want to execute  "this.ultraGrid1.Rows.Band.AddNew();" after I choose the value for the last column.

     

    thanks 

     

  • 1803
    posted

    Hi ,

     

    u can try to use the BeforecellDeactivate event..this will help you out.

     

    hppy Koding,

    Arun