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
3555
UltraGrid AfterRowInsert event fires before the row actually inserted
posted

Hi,

 I try to insert a row from the top as the below InitializeLayout

private void grdMyGrid_InitializeLayout(object sender, InitializeLayoutEventArgs e)

{

 

// Add-Row Feature Related Settings

e.Layout.Override.AllowAddNew = AllowAddNew.FixedAddRowOnTop;

e.Layout.Override.TemplateAddRowAppearance.BackColor = Color.FromArgb(245, 250, 255);

e.Layout.Override.TemplateAddRowAppearance.ForeColor = SystemColors.GrayText;

e.Layout.Override.AddRowAppearance.BackColor = Color.LightYellow;

e.Layout.Override.AddRowAppearance.ForeColor = Color.Blue;

e.Layout.Override.TemplateAddRowPrompt = "Enter new Pricing Drug Name here...";

e.Layout.Override.TemplateAddRowPromptAppearance.ForeColor = Color.Maroon;

e.Layout.Override.TemplateAddRowPromptAppearance.FontData.Bold = DefaultableBoolean.True;

}

Then I add the AfterRowInsert event to perform another task. When I run the application and click on the row "Enter new Pricing Drug Name here ...", I assumed that it should let me enter something and press the enter key to insert the row first, then the  AfterRowInsert event would be fired.  However, the AfterRowInsert event fires immediately when I click on the row "Enter new Pricing Drug ...." and not let me enter anything.

 

Any idea?

Thank you.

 

 

Parents Reply Children
No Data