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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Databound Grid column references

Thread ID:





3043 Feb 27,2003 02:19 AM UTC Feb 27,2003 06:55 AM UTC WinForms 2
Tags: GridControl
Asked On February 27, 2003 02:19 AM UTC

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

Administrator [Syncfusion]
Replied On 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);

Administrator [Syncfusion]
Replied On 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");


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

Live Chat Icon For mobile
Live Chat Icon