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

Excel selection sum behavior

Thread ID:

Created:

Updated:

Platform:

Replies:

10758 Feb 11,2004 05:26 PM UTC Feb 11,2004 07:27 PM UTC WinForms 1
loading
Tags: GridControl
Justin Koh
Asked On February 11, 2004 05:26 PM UTC

I''m trying to code a grid that will do a computation on the selected range (much like Excel does if you select a range: you can sum, count, etc). In the selectionChanged event, I loop through: For Each rngCurrent In grdIDBox.Selections For iCol = rngCurrent.Left To rngCurrent.Right For iRow = rngCurrent.Top To rngCurrent.Bottom If IsNumeric(grdIDBox.Item(iRow, iCol).CellValue) Then dCurrent = CDbl(grdIDBox.Item(iRow, iCol).CellValue) dSum += dCurrent iCountNums += 1 If dCurrent > dMax Or dMax = -1 Then dMax = dCurrent If dCurrent < dMin Or dMin = -1 Then dMin = dCurrent End If If Not CStr(grdIDBox.Item(iRow, iCol).CellValue) = "" Then iCount += 1 End If Next Next Next This works fine on my development machine, but when I compile my application a distribute it, it does not. It only count the last row I select, not all of the ranges.

Administrator [Syncfusion]
Replied On February 11, 2004 07:27 PM UTC

I am not sure why this is working differently on your development machine than on your distribution machine. Are you distributing Syncfusion.Grid.DLL and Syncfusion.Shared.Dll in addition to your exe and other dependent assemblies? Something to try is to use either grid.Selections.Ranges or call grid.Selections.GetSelectedRanges to retrieve the ranges instead of enumerating grid.Selections. Can you submit a sample project showing the problem (either here or through Direct Trac)?

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.

Please sign in to access our forum

or the page will be automatically redirected to 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

;