Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
1898 | Dec 3,2002 11:13 PM UTC | Jul 22,2003 09:48 PM UTC | WinForms | 13 |
![]() |
Tags: GridControl |
Me.GridControl1(row,col).CellType = "...."
at any point from code PROVIDED you do it while that particular cell is not the current cell. After the change, when the cell becomes current, it will use whatever celltype you set.
But, probably a better way to handle this dynamic swapping of cell types is to listen to the QueryCellInfo event. In your handler, check the e.RowIndex and e.ColIndex to decide what celltype this particular cell should be, and then set e.Style.CellType accordingly. Also, if you change the e.Style member, then set the e.Handled property to true. private void gridControl1_SaveCellInfo(object sender, GridSaveCellInfoEventArgs e) { if(e.RowIndex > 0 && e.ColIndex > 0) { if(this.gridControl1[e.RowIndex, e.ColIndex].CellType == "Static") { e.Handled = 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.
This page will automatically be redirected to the sign-in page in 10 seconds.