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

formula cell question

Thread ID:





46284 Jul 10,2006 02:08 PM UTC Jul 10,2006 03:28 PM UTC WinForms 2
Tags: GridControl
Philip Bishop
Asked On July 10, 2006 02:08 PM UTC

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 02:48 PM UTC

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 03:28 PM UTC

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


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