Databound Grid column references

Hi I have a databound grid which I am adding a total line to by entering formulas into a header row and passing to another gridcontrol. This works fine, the problem is that the number of columns is static and as a result it is difficult to create a formula as the column name could be called "Hours" but the formula is looking for "=SUM(C1:C10)" Does anyone know an easy way of getting column 10 and knowing this is column J for formula purposes. If not then I will have to create an array to handle this. Regards Mac

2 Replies

AD Administrator Syncfusion Team February 27, 2003 06:53 AM UTC

There is a static method in GridrangeInfo for this purpose. Try
string cellLabel = GridRangeInfo.GetAlphaLabel(colIndex) + GridRangeInfo.GetNumericLabel(rowIndex);


AD Administrator Syncfusion Team February 27, 2003 06:55 AM UTC

Also, there is a Binder method to get the colInex from the column name.
int colIndex = g.Binder.NameToColIndex("colName");

Loader.
Up arrow icon