private void Control_KeyUp(object sender, KeyEventArgs e)
{
if ((e.KeyCode == Keys.Enter) || (e.KeyCode == Keys.Return))
{
this.SelectNextControl((Control)sender, true, true, true, true);
}
}
private void Control_KeyUp(object sender, KeyEventArgs e)
{
if ((e.KeyCode == Keys.Enter) || (e.KeyCode == Keys.Return))
{
this.SelectNextControl((Control)sender, true, true, true, true);
}
}
//code on export to excel button
private void buttonExportExcel_Click(object sender, EventArgs e)
{
SaveFileDialog saveFileDialogExcel = new SaveFileDialog();
saveFileDialogExcel.Filter = "Excel files (*.xlsx)|*.xlsx";
if (saveFileDialogExcel.ShowDialog() == DialogResult.OK)
{
string exportFilePath = saveFileDialogExcel.FileName;
gridControl1.DataSource = selectgridvalues();
gridControl1.ExportToXlsx(exportFilePath);
}
}