We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridControl selection question

Thread ID:





64614 Jul 23,2007 05:52 PM UTC Jul 23,2007 10:40 PM UTC WinForms 2
Tags: GridControl
Julie Levy
Asked On July 23, 2007 05:52 PM UTC

Hi -
I am using the GridControl and need the following behavior:

User can only select one row at a time using the row header (no dragging the mouse or keyboard arrows, etc. to include other rows)

Selecting a cell also selects a row (on cell click i clear all selections and the select the row), so no selecting of multiple cells across multiple rows dragging the mouse or using the keyboard.

What are the proper controller options and event handling to prevent the mouse down dragging and keyboard selection of multiple rows/cells?


haneefm [Syncfusion]
Replied On July 23, 2007 09:38 PM UTC

Hi Julie,

You can try these code:

this.gridControl1.AllowSelection = GridSelectionFlags.Row | GridSelectionFlags.AlphaBlend;
this.gridControl1.SelectionChanging += new GridSelectionChangingEventHandler(gridSelectionChanging);

void gridSelectionChanging(object sender, GridSelectionChangingEventArgs e)
e.Cancel = e.Reason != GridSelectionReason.MouseDown;

Best regards,

Julie Levy
Replied On July 23, 2007 10:40 PM UTC

Thanks Haneef!


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon