In the attached form, I have a virtual grid that has a new base style defined called "FilterHeader" that is based on a column header. It's a combo box. When I change the value of the combo box and then try to select another cell, I get the "Specified argument was out of the range of valid values" messagebox from deep inside the grid. The only thing I can think that I could be doing wrong is the QueryCellInfo code? I boiled it down to the following:
if (e.ColIndex==15 && e.RowIndex==0)
Any help would be appreciated.
ADAdministrator Syncfusion Team July 7, 2003 08:53 AM
A couple of points. If you want the grid to store the header values for you, then you need to allocate some internal storage for this. Or, you could provide this header cell value in QueryCellInfo and save it in SaveCellInfo through some data item that you control. To use the grid's internal storage, you would need to set the column count on the grid's Data object.
this.gridControl1.Model.Data.ColCount = 100; //could use only 17 if that is last column hedaer you want to populate
Then in QueryCellInfo, you should not set e.Handled = true for this cell as you want to retrieve the saved value. Attached is a file with these changes that seems to work for me.