• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1244
  • Last Modified:

Ultragrid Column Formula - Circular Reference Error?

I have an Infragristics Ultragrid, that selects a couple of  columns that are categories with values:
I want to set a formula on these columns that is the column itself * qty, so the formula looks like

e.Layout.Bands[0].Columns[i].Formula =  "[" + e.Layout.Bands[0].Columns[i].ToString() + "] * [qty]"

but I get an error about Circular Formulas...how do I do this?

THANKS
0
melegant99
Asked:
melegant99
  • 3
1 Solution
 
saraganiCommented:
Maybe you get this error because the value of Column i = value of column i * qty ??

The source and result columns must not be the same, at least from what I understand.
0
 
melegant99Author Commented:
That is what I was looking for confirmation of...and that stinks....but I guess I will have to have to add some unbound columns .

thx.
0
 
saraganiCommented:
Infragistics has in their example that they take: col1 = col2 * 10
If you change that the destination and the source are not the same and you still get the error then post back and I'll try to figure it out.
0
 
saraganiCommented:
Ok, I've tested it also with Excel. It will give the same Circular Referece error, and it is only logical that it will do that.

You said that you are going to have an unbound column... The question is why?

If for example you get the data source by running an SQL Command and using data adapter to fill a DataSet then you can alter the SQL command to have the columns that you want and do manipulations on columns/data, for example:

SELECT ID, Col1*Col2 AS NewNameForColumn, Col3 FROM Table1;

That should do the trick... I'm suggesting those methods because working with unbound data can be very slow
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now