DataGridView selectedRow Property not get Data if i double click Row?

Posted by programmerist on Stack Overflow See other posts from Stack Overflow or by programmerist
Published on 2010-04-13T09:40:57Z Indexed on 2010/04/13 9:42 UTC
Read the original article Hit count: 426

i click double dataGridView's any row. Not get Data clicked row data:

 
  private void gwStudies_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            GoruntuyuAc();
        }

private void GoruntuyuAc()
        {
            olduid = "";
            DataRowView ro = (gwStudies.SelectedRows[0].DataBoundItem as DataRowView);
            string uid = "";
            uid = ro["StudyInstanceUid"].ToString();
            string tarih = "";
            DateTime t1 = Convert.ToDateTime(ro["StudyDate"]);
            //........
           //............
        }

Error Data on (gwStudies.SelectedRows[0].DataBoundItem as DataRowView);
IMAGE:alt text

© Stack Overflow or respective owner

Related posts about c#

Related posts about visual-studio