When i specify a GridRangeInfo onject usind cells(1,1,10,1) and pass this in to a PopulateValues call, it works fine, however if i specify a gridrangeinfo object using Col(1), the grid does not populate.
ADAdministrator Syncfusion Team June 18, 2003 09:49 AM
Before passing the column range, call range.ExpandRange(1, 1, grid.RowCount, grid.ColCount) to change the column range to a cell range.
If you look at a column range, its Bottom member is a huge value. Using ExpandRange converts these value to viable numbers.
TMTrevor MoodyJune 19, 2003 08:17 AM
thanks for that. A second question though, if I pass an array list into a PopulateValues call, where the Arraylist contains objects with a series of properties, is there a way to control which column each property maps to on the grid, whilst using Populatevalues in this way.
ADAdministrator Syncfusion Team June 19, 2003 01:46 PM
No. If you want to control the order, you woul dhave to do the looping your self, pulling in the right property for the current col index.
In your loop, you would use code similar to this to populate things quickly and avoid teh event processing that slows thing down when you use indexers.
//loop on rowIndex and colIndex
GridStyleInfo style = new GridStyleInfo();
style.CellValue = item; //your value...
SetCellInfo(rowIndex, colIndex, style, StyleModifyType.Override, true, true);