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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridListControl column count greater than 10

Thread ID:

Created:

Updated:

Platform:

Replies:

12491 Mar 31,2004 07:27 PM UTC Apr 1,2004 12:29 PM UTC WinForms 3
loading
Tags: GridControl
Michael Corrigan
Asked On March 31, 2004 07:27 PM UTC

I have a GridListControl that I have set the ColCount = 11. This is done in the OnQueryColCount method. When I try to assign a cell value at column 11, I get the error "Specified argument was out of the range of valid values. Parameter name: colIndex".

Administrator [Syncfusion]
Replied On March 31, 2004 08:06 PM UTC

The GridListControl holds no data, it is the DataSource that you assign to the GridListControl that holds the data. So, you cannot set a value in any column. Instead you would normally set it in the DataSource that you have assigned to the GridListControl, an dthe GridListControl gets it from the DataSource. If you want to dynamically set the column count using QueryColCount, then you would also need to handle QueryCellInfo, and provide the value by setting e.Style.CellValue based on the e.ColIndex and e.RowIndex values. (This is how you ''set'' the value. You provide it on demand in QueryCellInfo).

Michael Corrigan
Replied On April 1, 2004 12:22 PM UTC

This is how I am setting the column headers: gcAgentBonus.Grid[0,9].CellValue = "Level 1"; gcAgentBonus.Grid[0,10].CellValue = "Level 2"; but once I get to column 11: gcAgentBonus.Grid[0,11].CellValue = "Bonus"; this is when the exception occurs. Am I not setting the column headers correctly?

Administrator [Syncfusion]
Replied On April 1, 2004 12:29 PM UTC

Normally, you would furnish the headers in QueryCellInfo. The reason the work up to 10, is that the default values of gcAgentBonus.Grid.RowCount and gcAgentBonus.Grid.ColCount are set to 10 x 10. And it is these default values that allow your code to work up to 10. One thing you could try is just setting gcAgentBonus.Grid.ColCount = 11. This would allocate the space for 11 columns an dlikely allow you code setting the headers to work. This would likely be fine as long as teh number of columns is small.

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.

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

;