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
305
Hitting enter doesn't fire KeyDown Event
posted

Hi

I am using ultraGrid (NetAdvantage 8.1 Win CLR2x). When user hits Enter Key on a row i have to show the details of the row on a different form.

KeyDown event is not getting fired when i hit enter on row. Can any one help me?

 private void ultraGridCatalogVehicles_AfterRowActivate(object sender, EventArgs e)
        {
          
            ultraGridCatalogVehicles.KeyDown += new KeyEventHandler(ultraGridCatalogVehicles_KeyDown);
        }

 void ultraGridCatalogVehicles_KeyDown(object sender, KeyEventArgs e)
        {

                if (e.KeyCode == Keys.Enter)
                {
                    if (ultraGridCatalogVehicles.Rows.Count > 0)
                    {
                        int rowIndex = ultraGridCatalogVehicles.ActiveRow.Index;
                        int catalogVehicleId = Convert.ToInt32(ultraGridCatalogVehicles.Rows[rowIndex].Cells["CatalogVehicleId"].Value);
                       
                    }
                }
          
        }