private void action_CustomizeSelectedValue(object sender, EventArgs e) { try { DataGridViewRow defaultRow = gridviewDefaultTable.SelectedRows[0]; string tableName = gridviewManager.event_RetrieveCellDataValue(defaultRow, 0); if (tableName.ToLower().Equals("main")) { MessageBox.Show("'Main' table columns & values cannot be customized."); return; } string columnName = gridviewManager.event_RetrieveCellDataValue(defaultRow, 1); if (columnName.ToLower().Equals("test_case_id")) { MessageBox.Show("'Test_Case_ID' column cannot be customized."); return; } string dataValue = gridviewManager.event_RetrieveCellDataValue(defaultRow, 2); string[] customRow = new string[] { tableName, columnName, dataValue }; gridviewCustomTable.Rows.Add(customRow); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void action_LaunchHtmlReport(object sender, EventArgs e) { if (gridview.Rows.Count == 0) { return; } DataGridViewRow row = gridview.SelectedRows[0]; int columnIndex = gridview.Columns["Results_Location"].Index; string filePath = gridviewManager .event_RetrieveCellDataValue (gridview.SelectedRows[0], gridview.Columns["Results_Location"].Index); if (File.Exists(filePath)) { Process.Start(filePath); } else { MessageBox.Show("HTML results file could not be found."); } }