Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
18208 | Aug 26,2004 01:34 AM UTC | Aug 26,2004 11:59 AM UTC | WinForms | 3 |
![]() |
Tags: GridControl |
private void button1_Click(object sender, System.EventArgs e) { this.gridControl1[2,2].ReadOnly = true; this.gridControl1[2,2].BackColor = Color.Red; }clicking the button does not change the color of the cell for me. If you are seeing the color change the first time, I suspect you are executing the change code at some point the grid has the original style cached (maybe its the style for the current cell, and you are trying to set it while the cell is editing or something), and it is the cached old style that is allowing the first change to take. Just a guess. If you can post a sample showing the behavior, we can probably provide a more concrete explanation.
>private void button1_Click(object sender, System.EventArgs e) >{ > this.gridControl1[2,2].ReadOnly = true; > this.gridControl1[2,2].BackColor = Color.Red; >} >>clicking the button does not change the color of the cell for me. If you are seeing the color change the first time, I suspect you are executing the change code at some point the grid has the original style cached (maybe its the style for the current cell, and you are trying to set it while the cell is editing or something), and it is the cached old style that is allowing the first change to take. Just a guess. > >If you can post a sample showing the behavior, we can probably provide a more concrete explanation.
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.