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.

formula cell question

Thread ID:

Created:

Updated:

Platform:

Replies:

46284 Jul 10,2006 10:08 AM Jul 10,2006 11:28 AM Windows Forms 2
loading
Tags: GridControl
Philip Bishop
Asked On July 10, 2006 10:08 AM

I have a question about how we are doing formulas. We recently on some forms that had only 32 cols have now expanded those to have 100 cols. Below is a sample of the code of how we were loading the formula cells. The problem I have is that when I try to put col ''as'' in my enum below it wont let me use it. It errors out because ''as'' is a reserved word. Is there a more simple way to do what we are doing or any suggestions on how to make what we have work? Thanks Private Enum alpha As Integer a = 1 b c d e f g h i j k l m n o p q r s t u v w x y z aa ab ac ad ae af ag ah aj ak al am an ao ap aq ar at End Enum For i = 2 To 100 With grdCB_PRP(2, i) .Format = "0.00" .CellType = "FormulaCell" .CellValue = "=Sum" & "(" & [Enum].GetName(bit.GetType, i) & 3 & ":" & [Enum].GetName(bit.GetType, i) & 42 & ")" End With Next

Administrator [Syncfusion]
Replied On July 10, 2006 10:48 AM

Instead of using [Enum].GetName(bit.GetType, i), try using the shared member of GridRangeInfo.GetAlphaLabel. Dim col as String For i = 2 To 100 col = GridRangeInfo.GetAlphaLabel(i) With grdCB_PRP(2, i) .Format = "0.00" .CellType = "FormulaCell" .CellValue = "=Sum" & "(" & col & 3 & ":" & col & 42 & ")" End With Next

Philip Bishop
Replied On July 10, 2006 11:28 AM

Hey thanks for the fast response. Thats exactly what I was looking for. Works great!!

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.

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.

;