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.

PopulateValues - Why doesn't this work?

Thread ID:

Created:

Updated:

Platform:

Replies:

3266 Mar 11,2003 09:43 AM Mar 11,2003 12:50 PM Windows Forms 1
loading
Tags: GridControl
Maxim Software Systems
Asked On March 11, 2003 09:43 AM

I'm trying to fill a grid with data on a row by row basis using the PopulateValues method of the grid. However, only the first column gets text put in it, the other columns of each row are left blank. Dim x(4) As String x(0) = "test1" x(1) = "test2" x(2) = "test3" x(3) = "test4" grdTest.PopulateValues(GridRangeInfo.Cells(1, 1, 1, UBound(x)), x) This code leaves only the first column with the text "test1", but the other columns are blank.

Administrator [Syncfusion]
Replied On March 11, 2003 12:50 PM

If you try this code, you would see your data populate column 1. grdTest.PopulateValues(GridRangeInfo.Cells(1, 1, UBound(x), 1), x) The method only populates across a row if there are two indices in the datasource. If there is only a single index in the datasource, it thinks you want to change rows with each new index. But is is straight-forward (and ver quick) to use SetCellInfo to populate across a row by looping through the row and calling SetCellInfo on each item. (This is what PopulateCells does).
'loop through this code
Dim style as GridStyleInfo = New GridStyleInfo()
style.CellValue = X(i)
grdTest.SetCellInfo(row, i, sfstyle, Syncfusion.Styles.StyleModifyType.Override)

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.

;