Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1045
change cell's border
posted

Hi experts,

I'd like to change the border of a cell. But it change the border of entire grid as long as I set cell's border. Wierd, I'm not sure what happend. Please help!!!
As you can see, I try to change the first cell's border, but the entire grid's border turns to red...

DataRecord dr = (DataRecord)this._copylengthGrid.Records[0];
Cell cell = dr.Cells[0];
cell.DataPresenter.BorderThickness = new Thickness(5);
cell.DataPresenter.BorderBrush = Brushes.Red;