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.

PopulateHeaders and PopulateValues problems

Thread ID:

Created:

Updated:

Platform:

Replies:

16006 Jul 2,2004 04:50 AM Jul 2,2004 08:44 AM Windows Forms 1
loading
Tags: GridControl
Derek Stafford
Asked On July 2, 2004 04:50 AM

I''ve looked at previous posts regarding these methods and I have finally worked out that PopulateValues requires a 2-dimensional array as a datasource. I''m still having trouble with PopulateHeaders though. It appears to accept a 1-dimensional array. When I pass it such an array only the first column header is populated with the text ''Value''. What am I doing wrong? Here is my code: private GridControl grdTransactions; string[] headers ={"trans","count","min","max","mean"}; grdTransactions.Cols.Hidden[0] = true; grdTransactions.Rows.Hidden[0] = true; grdTransactions.Rows.HeaderCount = 1; grdTransactions.ColCount = 5; grdTransactions.PopulateHeaders(GridRangeInfo.Cells(1,1,1,5), headers);

Administrator [Syncfusion]
Replied On July 2, 2004 08:44 AM

The PopulateHeaders will not handle setting values in column headers. You can use code like this to set values in the headers without triggering events.
string[] headers ={"trans","count","min","max","mean"};
int row = 1;
int col = 1;
foreach(string s in headers)
{
	GridStyleInfo style = new GridStyleInfo();
	style.Text = s;
	this.gridControl1.SetCellInfo(row, col, style, Syncfusion.Styles.StyleModifyType.Override, true, false); 
	col++;
}

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.

;