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. Image for the cookie policy date

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 01:56 AM

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 07:39 AM

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 09:50 AM

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

Loader.
Live Chat Icon For mobile
Up arrow icon