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

GridRangeInfo object and PopulateCaluesMethod

Thread ID:





5082 Jun 18,2003 12:15 PM UTC Jun 19,2003 05:46 PM UTC WinForms 3
Tags: GridControl
Trevor Moody
Asked On June 18, 2003 12:15 PM UTC

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. Any ideas?

Administrator [Syncfusion]
Replied On June 18, 2003 01:49 PM UTC

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.

Trevor Moody
Replied On June 19, 2003 12:17 PM UTC

Clay, 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. Thanks Trevor

Administrator [Syncfusion]
Replied On June 19, 2003 05:46 PM UTC

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);


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