Tuesday, May 10, 2011

Selecting Row from XtraGrid with Object type DataBinding.

private void gridView1_FocusedRowChanged(object sender, |
              DevExpress.XtraGrid.Views.Base.
FocusedRowChangedEventArgs e)
{
GridView view = sender as GridView;
if (view.SelectedRowsCount > 0) // i there a selected Row?
{
    Contacts indirectContact = (Contacts)view.GetRow(e.FocusedRowHandle);
    currentSelectedContactId =
Convert.ToString(Contact.ContactID);
}

 

No comments :

Post a Comment