private void tsmiOpenUrl_Click(object sender, EventArgs e) { if (gridView1.SelectedRowsCount > 0 && gridView1.GetSelectedRows()[0] >= 0) { int Id = Convert.ToInt32(gridView1.GetRowCellValue(gridView1.GetSelectedRows()[0], gridView1.Columns["Id"]).ToString()); Trademark thisTmpRec = tempRecList.Where(i => i.Id == Id).First(); string url = thisTmpRec.getUrl(); if (url.Trim() != "") { System.Diagnostics.Process.Start(url); } else { MessageBox.Show("Δεν υπάρχει καταχωρημένο Url για τη συγκεκριμένη εγγραφή!"); } } }
private void tsmiOpenUrl_Click(object sender, EventArgs e) { if (dgvTempRecs.SelectedRows.Count > 0) { int Id = Convert.ToInt32(dgvTempRecs.SelectedRows[0].Cells["tmp_Id"].Value.ToString()); Trademark thisTmpRec = tempRecList.Where(i => i.Id == Id).First(); string url = thisTmpRec.getUrl(); if (url.Trim() != "") { System.Diagnostics.Process.Start(url); } else { MessageBox.Show("Δεν υπάρχει καταχωρημένο Url για τη συγκεκριμένη εγγραφή!"); } } }
private void gridView1_DoubleClick(object sender, EventArgs e) { DevExpress.Utils.DXMouseEventArgs ea = e as DevExpress.Utils.DXMouseEventArgs; DevExpress.XtraGrid.Views.Grid.GridView view = sender as DevExpress.XtraGrid.Views.Grid.GridView; DevExpress.XtraGrid.Views.Grid.ViewInfo.GridHitInfo info = view.CalcHitInfo(ea.Location); if (info.InRowCell) { int Id = Convert.ToInt32(gridView1.GetRowCellValue(gridView1.GetSelectedRows()[0], gridView1.Columns["Id"]).ToString()); Trademark tm = tempRecList.Where(i => i.Id == Id).First(); string url = tm.getUrl(); if (url.Trim() != "") { System.Diagnostics.Process.Start(url); } else { MessageBox.Show("Δεν υπάρχει καταχωρημένο Url για τη συγκεκριμένη εγγραφή!"); } } }