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

Selected rows cols info

Thread ID:





68720 Sep 28,2007 03:24 PM UTC Sep 29,2007 01:58 AM UTC WinForms 2
Tags: GridControl
Qingde Shi
Asked On September 28, 2007 03:24 PM UTC


I am wondering if there is an existing example or somebody can point a direction about how to achieve the following.

Basically, I want to show selected number of rows and cols like "5R x 6C" in a popup while user is selecting cells using mouse. similar to selection in excel, but the info is in a popup.

Thanks in advance.


haneefm [Syncfusion]
Replied On September 28, 2007 07:01 PM UTC

Hi Q,

One way you can do this by using the Model.SelectionChanging event of the grid and display selected cell information using the e.Range.Info property. Below are the codes that shows this task.

//Property of the Form1 class
private Label SelectedRangelabelText = null;

//Form Load event.
SelectedRangelabelText = new Label();
this.gridControl1.Model.SelectionChanging += new GridSelectionChangingEventHandler(Model_SelectionChanging);

void Model_SelectionChanging(object sender, GridSelectionChangingEventArgs e)
Point pt = this.gridControl1.PointToClient(Control.MousePosition);
pt.Offset(35, 20);
SelectedRangelabelText.Location = pt;// e.OldRanges.ActiveRange;
if (e.Range != null)
SelectedRangelabelText.Text = e.Range.Info;

Best regards,

Qingde Shi
Replied On September 29, 2007 01:58 AM UTC


Thanks. That's very helpful.



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