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

GetCellsInfo doesn''t work for Column or Row ranges

Thread ID:

Created:

Updated:

Platform:

Replies:

61269 May 22,2007 08:44 PM UTC May 22,2007 11:22 PM UTC WinForms 2
loading
Tags: GridControl
Brian Richards
Asked On May 22, 2007 08:44 PM UTC

Calling that method with a range that's column or row based causes an exception. See my attached project. You can click on cells and multi-select but if you click on a row or column header you get an arithmetic exception.

Is there a function I can use to convert Column or Row ranges to Cell based ranges?

Thanks

CellInfoDefect.zip

Brian Richards
Replied On May 22, 2007 08:46 PM UTC

I'm using version 5.1

>Calling that method with a range that's column or row based causes an exception. See my attached project. You can click on cells and multi-select but if you click on a row or column header you get an arithmetic exception.

Is there a function I can use to convert Column or Row ranges to Cell based ranges?

Thanks

CellInfoDefect.zip

haneefm [Syncfusion]
Replied On May 22, 2007 11:22 PM UTC

Hi Brain,

You can try this code in a SelectionChanged event of the grid and let me know if this helps.

GridRangeInfo range = gridControl1.Selections.Ranges.ActiveRange;
if (range.IsRows)
range = GridRangeInfo.Cells(range.Top, 0, range.Bottom, gridControl1.ColCount);
else if (range.IsCols)
range = GridRangeInfo.Cells(0, range.Left, gridControl1.RowCount,range.Right);
GridStyleInfo[] info = gridControl1.GetCellsInfo(range);

Best regards,
Haneef

CONFIRMATION

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.

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

;