Home Forums WinForms controls Xceed Grid for WinForms How can i set the focus to an InsertionRow after the row insertion? Reply To: How can i set the focus to an InsertionRow after the row insertion?

Xceed Support
Member
Post count: 5658

Hi Aurelio, 

In this case, you can handle the EditBegun event on the insertion row and set your default values:

for example:

     insertionrow.EditBegun += new EventHandler( insertionrow_EditBegun );
          
         

private void insertionrow_EditBegun ( object sender, EventArgs e )
        {
          try
          {
            InsertionRow newrow = ( sender as InsertionRow );

            newrow.Cells[ “EP_Create” ].Value = 0;
            newrow.Cells[ “GroupName” ].Value = “test”;
          }
          catch( InvalidOperationException ex )
          {
            MessageBox.Show( ex.Message );
          }

        } 

Imported from legacy forums. Posted by Michel [Xceed] (had 1392 views)