Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
85
Selected rows collection in WinGrid version 8.1
posted

Hello,

I updated Infragistics version from 6.1 to 8.1. and got some problems. On the form I have WinGrid ("ugContacts") and context menu.

The following code worked for previous version:

private void ugContacts_MouseUp(object sender, MouseEventArgs e)

{try { //"Delete" option in context menu needs to be enabled or disabled

if (e.Button == MouseButtons.Right)

{if (ugContacts.Selected.Rows.Count > 0)

ctxDelete.Enabled = true;

else

ctxDelete.Enabled = false;

displayContext.Show(ugContacts, e.X, e.Y);}}

catch (Exception ex)

{ErrorHelper.ShowApplicationError(ex);}}

But today with the version 8.1 I have always ugContacts.Selected.Rows.Count =0 regardless of where I click - on row or outside the grid. What is the problem here?

Thanks