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
505
To get rid of the ugly blue rectangle on the selected cell
posted

I cannot believe it is so difficult to get rid of the ugly sticky blue rectangle when a cell is selected. 

I searched the Forums and found some articles and followed the example but I still could not get it done.

I tried the suggested approach to use DrawFiler, but I have spent many hours and accomplished nothing.  The most close I got was entering DrawPhase.BeforeDrawForeground case stmt and making drawParams.AppearanceData.ForeColor a hard code red color (because aCell.Appearance.ForeColor.IsEmpty was true and it would never meet the condition, so I removed it and hard color the color just for testing).  This is for text forecolor.

The most important thing is to restore the background color to the normal color, which I had never had it working.  First I don’t know how would DrawPhase.BeforeDrawBackColor being return in GetPhasesToFilter().  I was trying several Infragistics.Win.UIElementDrawParams trying to see if I can get it returned, but it wouldn’t.  By the way, I could not find all the enum type in Infragistics.Win.UIElementDrawParams – missing in documentation .  I had to use debug print to catch all enum and guessing which is the right enum but failed. 

I JUST WANTED TO KNOW HOW TO GET RID OF THE UGLY BLUE STICKY BLUE RECTANGLE ON THE SELECTED CELL.  Infragistics should make it easier to use either desgin time setting or one line code, etc. Or you should post a code sample with description in the KB that we can use it in our code.  It is unbelievable that we need to spend hours and hours and still had no good sultion.


In using MyDrawFilter1(); I can get fore color changed to RED (hard code for testing, not the intended aCell.Appearance.ForeColor ); in using MyDrawFilter2(), I would get a white rectangle with no text, which was not acceptable.

These are the links to the articles in KB and Forums:  None of them worked for me.

Knowledge Base Article: KB03197
HOWTO:How can I have Selected cells in a grid maintain their forecolor?     <<<< I wanted background


Knowledge Base Article: KB04791
HOWTO:How can I turn off the Focus Rectangle on an Infragistics Win Control?

How to avoid this type of selection  <<<<< This just drew a white rectangle without text.

Parents
  • 469350
    Offline posted

    What exactly do you mean by "ugly blue rectangle"?

    Are you talking about the focus rect? The focus rect is not blue by default. It's a dotted black line drawn around the active row or active cell in the grid.

    Or are you talking about the BackColor of the cells / rows? 

    Either way, the KB articles you listed here do work. If they are not working for you, then I'd be happy to assist you, but you will need to be more specific about exactly what you are trying to do and what exactly is not working. Perhaps you can post a sample demonstrating what is not working. 

Reply Children