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.
Unfortunately, activation email could not send to your email. Please try again.

List of selected regions *in the order selected*?

Thread ID:





34715 Sep 14,2005 05:05 PM Sep 16,2005 12:01 AM Windows Forms 3
Tags: GridControl
Ken Overton
Asked On September 14, 2005 05:05 PM

Is it possible to assemble such a collection?

Administrator [Syncfusion]
Replied On September 15, 2005 08:16 AM

Hi Kov, Please take a look at the sample. //To get the range count GridRangeInfoList ranges; this.gridControl1.Selections.GetSelectedRanges(out ranges, true); MessageBox.Show(ranges.Count.ToString()); /To get selected row(s)count int selectedRows = 0; foreach(GridRangeInfo range in this.gridControl1.Selections.GetSelectedRows(true, false)) { selectedRows += range.Bottom - range.Top + 1; } MessageBox.Show(selectedRows.ToString()); //To get the selected rows foreach(GridRangeInfo r in this.gridDataBoundGrid1.Selections.Ranges) for(int row = r.Top; row <= r.Bottom; row++) Console.WriteLine("hit on row " + row); Here is the sample SelectedRange_6639.zip Let us know if this helps. Best Regards, Jeba.

Ken Overton
Replied On September 15, 2005 09:47 AM

Beautiful, thanks. Is this documented somewhere that I could have gone to instead of posting to this forum? I tried searching the MSDN docs that were installed with the Syncfusion software but missed it there; I tried searching your website knowledgebase and here in the forum also. I have noted in the past that the forum search results cannot be trusted.

Administrator [Syncfusion]
Replied On September 16, 2005 12:01 AM

Hi Kov, Thanks for the update.Please feel free to contact us if you have any other concerns. Thanks for choosing Syncfusion Products. Best Regards, Jeba.


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.

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.