/// <summary> /// The edit current row. /// </summary> private void EditCurrentRow() { var selectedRows = this.grdViewMain.GetSelectedRows(); if (selectedRows.Length == 0) { return; } var frmEditMediaPath = new FrmEditMediaPath( FrmEditMediaPath.MediaPathActionType.Edit, this.grdViewMain.GetRow(selectedRows[0]) as MediaPathModel); frmEditMediaPath.ShowDialog(this); }
/// <summary> /// Handles the Click event of the BtnAdd control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void BtnAdd_Click(object sender, EventArgs e) { var frmEditMediaPath = new FrmEditMediaPath(FrmEditMediaPath.MediaPathActionType.Add, new MediaPathModel()); frmEditMediaPath.ShowDialog(this); grdViewMain.RefreshData(); // ButRefresh_Click(null, null); }