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.

GridStyleInfo for entire row / col

Thread ID:

Created:

Updated:

Platform:

Replies:

32167 Jul 22,2005 01:13 PM Jul 22,2005 01:58 PM Windows Forms 2
loading
Tags: GridControl
Adam K.
Asked On July 22, 2005 01:13 PM

i find myself entering this code alot: for (int i=0; i<_g.ColCount;i++) { _g[_g.RowCount,i].CellType = "Static"; _g[_g.RowCount,i].ReadOnly = true; _g[_g.RowCount,i].BorderMargins = GridMarginsInfo.Empty; _g[_g.RowCount,i].Borders.Bottom = GridBorder.Empty; _g[_g.RowCount,i].Borders.Right = GridBorder.Empty; } is there anyway to do this for the entire row (or column) without having to loop through each cell thanks, ak

Administrator [Syncfusion]
Replied On July 22, 2005 01:49 PM

Is _g a GridControl? If so, you can set the styles for columns using the grid.ColStyles collection. You can set rowstyles using grid.RowStyles collection. If you want to set an arbitrary range of cells, you can use grid.ChangeCells. //red column grid.ColStyles[4].BackColor = Color.Red;

Adam K.
Replied On July 22, 2005 01:58 PM

thks >Is _g a GridControl? > >If so, you can set the styles for columns using the grid.ColStyles collection. You can set rowstyles using grid.RowStyles collection. If you want to set an arbitrary range of cells, you can use grid.ChangeCells. > > >//red column >grid.ColStyles[4].BackColor = Color.Red; >

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.

;