if (dg.SelectedItems.Count > 0)
{
for (int i = 0; i < dg.SelectedItems.Count; i++)
{
System.Data.DataRowView selectedRow = (System.Data.DataRowView)dg.SelectedItems[i];
MessageBox.Show( Convert.ToString(selectedRow.Row.ItemArray[2]));
}
}
{
for (int i = 0; i < dg.SelectedItems.Count; i++)
{
System.Data.DataRowView selectedRow = (System.Data.DataRowView)dg.SelectedItems[i];
MessageBox.Show( Convert.ToString(selectedRow.Row.ItemArray[2]));
}
}