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.

Copying vitual grids

Thread ID:

Created:

Updated:

Platform:

Replies:

25711 Mar 3,2005 11:56 PM Mar 4,2005 06:55 AM Windows Forms 5
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On March 3, 2005 11:56 PM

When copying virtual grids to a normal gridcontrol, i am not getting all the properties of the grid copied to normal grid. For example in the virtual grid i have set col 2 of all the rows readonly. But when i copy to a new grid, the readonly property is copied only for the grids that are in the visible region in the view. for remaining rows i am not getting the readonly property in the new grid. How do i solve this problem.? Thanks in advance

Administrator [Syncfusion]
Replied On March 4, 2005 03:39 AM

These ''column style properties'' in the virtual grid need to be copied to the gridControl1.ColStyles[nCol] style in the non-virtual grid. This will make the style property column-wide in the non-virtual grid.

Administrator [Syncfusion]
Replied On March 4, 2005 05:09 AM

I copied the virtual grid to a new grid as follows for( int row=0; row<=virtgrid.RowCount; row++) for( int col=0; col<=virtgrid.ColCount; col++) { GridStyleInfo copyCell = copyGrid[row+curRow,col]; GridStyleInfo cell = virtgrid[row,col]; copyCell.Text = cell.Text; copyCell.BackColor = cell.BackColor; copyCell.CellType = cell.CellType; copyCell.TextColor = cell.TextColor; copyCell.Font = cell.Font; copyCell.HorizontalAlignment = cell.HorizontalAlignment; copyCell.VerticalAlignment = cell.VerticalAlignment; copyCell.Description = cell.Description; copyCell.ImageList = cell.ImageList; copyCell.ImageIndex = cell.ImageIndex; copyCell.ReadOnly=cell.ReadOnly } But still i have the problem..I get the readonly property true for visible grid area in the view. suppose i have 25 rows visible in the view (in a total of 50rows), i get readonly property true for those 25 cells. for the remaining rows i get the readonly property false. How do i solve this problem

Administrator [Syncfusion]
Replied On March 4, 2005 05:20 AM

When you debug this code, is virtgrid.Row showing the values you expect? Dow row + curRow run through the values you expect (say if you add a Console.WriteLine in the loop and WriteLine out the loop index and several of teh values of interst like the two ReadOnly setting before and after setting them, etc. If you can upload a little sample project showing this problem, we can try to debug it here.

Administrator [Syncfusion]
Replied On March 4, 2005 05:29 AM

when i debug this code i get all the other properties correctly..such as text, cell type etc..but not the readonly property for the rows that are not visble in the grid area. >When you debug this code, is virtgrid.Row showing the values you expect? Dow row + curRow run through the values you expect (say if you add a Console.WriteLine in the loop and WriteLine out the loop index and several of teh values of interst like the two ReadOnly setting before and after setting them, etc. > >If you can upload a little sample project showing this problem, we can try to debug it here.

Administrator [Syncfusion]
Replied On March 4, 2005 06:55 AM

Is teh readonly setting correct when you retrieve it from grid1? If you check grid2 immediately after setting the style, does it show the proper readonly setting. I do not see this problem in this sample using 3010. Can you? Or can you modify it to show the problme you are having? http://www.syncfusion.com/Support/user/uploads/GC_Virt_Copy_f21eef2a.zip

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.

;