Hi,
I have used an appstylist for entire application. I would like to override the hot tracking property for one grid in a screen since there are some colour background are used in cells when mouse over i lost the background color of the cells in that row. I tried to reset the hot track appearance of Row and Cell as like as selected and active rows and cell appearance and enable those as false. But i am able to do it for selected, active but not for hot track. Is there any way to avoid hot tract property for the grid. Simply i dont want the Selected, Active and Hot track features of the grid. Please help me.
Regards,
Sabeer
Hi Sabeer,
There is no easy way for the application to override the AppStylist setting for HotTracking.
Do you want to turn off the HotTracking for all of the grid in the application, or just some of them?
If you don't want hottracking on any grids, then the easiest thing to do is open up the isl file and remove any settings on the HotTracking state for the UltraGridRow (and maybe UltraGridCell) role.
If you need HotTracking on some grids and not others, then you will need to make some modifications to both your isl file and your application.
What you can do is create a new StyleSet in the isl file you are using and set the BasedOn to the current default StyleSet you are using (you probably only have one).
Then, you have to copy the HotTracking settings that you want from the original StyleSet onto the new one - and reset those settings (so they are not set) on the original StyleSet).
Then, in your application, you set the StyleSetName property on any grids where you want HotTracking enabled to the name of the new StyleSet that has the HotTracking appearances applied.
Hi Mike,
Thanks your answer.
I have created a new styleset and named different than the default one. Then removed the hot tracking for Grid Row in that, then i set the styleset name for the Grid which one i want to remove the hot tracking appearance. Now i have achieved.
Thanks again for your prompt and valuable support.
Thanks Mike, will try your fix!
I was able to get it to work by modifying the isl file. I had to do a few things.
First, since you don't want any HotTracking at all, I went to the GridCell UI Role and I reset the entire HotTracked state. There's no reason to have any settings on that state if you don't want any HotTracking on the cell.
That still didn't work, though, so then I went to the Normal State of the same role and I set the Alpha level of the background to Default (it was set to Transparent). So somehow, when it HotTracked, the cell was not drawing a background color and the row HotTracked color was showing through. It's a little weird and I'm not 100% sure exactly what's going on, but that seems to fix it. I am attaching the modified isl file here.
Regarding the borders, I noticed that the borders draw around the cells on all side except the bottom. That's because cells never draw all 4 border sides. If they did, you would have a double-thick border in between every two adjacent cells. The only way around that is to set the CellPadding to something higher than 0 so there's a space in between the cells which would force every cell to draw all 4 border sides. Frankly, I find that using cell borders for HotTracking or highlighting doesn't work very well.
Sure, demo attached, vs2012 infragistics 15.1
I'd like my green rows to remain green, just have a black border on active/selected/hottrack instead of becoming white. Can't seem to figure out which properties I have to set.
Thanks!
Can you create a small sample project that includes the isl file you are using so I can take a look and see what's going on?
I'm having a similar issue and seem to be unable to figure out a solution.
I have a grid in which some of the rows have a backcolor (conditionally set using e.Row.Appearance.BackColor in the InitializeRow event).
However, the hottrack feature changes thebackground color on these rows.
We use a custom appstyle based on the metro style. I've set the hottrack background of both the gridrow and ultragridcell to transparant, without success. But If I set it to a solid color, I do see it appearing.
Any suggestions on how to keep my initally set row backcolor?