DataBoundGrid

Clay, Is there anyway we can make Column Heading as ''Fixed3D'' style and How can change the back color/font color of the selected cell. Thanks Satish

3 Replies

AD Administrator Syncfusion Team May 20, 2004 05:56 AM UTC

I responded to the first question in your other forum thread. >>How can change the back color/font color of the selected cell Do you mean the current cell in the grid, and any cell that you have selected by dragging a cell range (or using teh keyboard to select cells). You can do both (just using different condition checks) by handling PrepareViewStyleInfo. Maybe with code similar to: GridCurrentCell cc = this.gridControl1.CurrentCell; if(cc.RowIndex == e.RowIndex && cc.ColIndex == e.ColIndex) { //color current cell e.Style.BackColor = Color.Black;//???? e.Style.TextColor = Color.White;//???? }


SA Satish May 20, 2004 11:39 AM UTC

Clay, I have tried the code which you have mentioned here but not working. I need to change the backcolor/font color of ''current cell'' in the DataBoundgrid. If i moved to another cell, I should get back the old backcolor/fontcolor of the cell again. Thanks Satish >I responded to the first question in your other forum thread. > >>>How can change the back color/font color of the selected cell > >Do you mean the current cell in the grid, and any cell that you have selected by dragging a cell range (or using teh keyboard to select cells). > >You can do both (just using different condition checks) by handling PrepareViewStyleInfo. >Maybe with code similar to: > > >GridCurrentCell cc = this.gridControl1.CurrentCell; >if(cc.RowIndex == e.RowIndex && cc.ColIndex == e.ColIndex) >{ > //color current cell > e.Style.BackColor = Color.Black;//???? > e.Style.TextColor = Color.White;//???? >} >


AD Administrator Syncfusion Team May 20, 2004 01:50 PM UTC

It seems to work OK for me in this minimal sample. What are you doing differently. WindowsApplication3_8994.zip

Loader.
Up arrow icon