Hello ,
You could use InitializeRow event of UltraGrid in order to hide cells from SP1 and SP2 columns, and then to use MouseEnterElelemnt and MouseLeaveElelemnt events in order to display/hide those cells if the row meets some criteria. Please see attached sample.
Please let me know if you have any further questions.
Hristo, I had to copy your code into another solution to make it run.
I may be missing something but I do not see the behavior that you were trying to demostrate. Here are two screen shot. In one case the focus is on band 2 and in the second case the focus is on band 3 (the one with the special cells). In both case, the UI does not look any different.
See here http://i46.tinypic.com/2ihv8uv.png
Hello,
It seems that you are not subscribe for the InitializeRow, InitializeLayout, MouseEnterElement and MouseLeaveElement events (they are in your code but UltraGrid is not subscribed for them). On the attached video you could see how this code works.
Hristo, that's great. Was able to use your implementation. The mistake I made is to set the Column's Hidden property and try to make the cell visible. I guess the Column Hidden property keeps the Cell from ever being Visible.
I modified you Form and made some changes. I could not use your solution file because of incompatibility my older Visual Studio version. But can you incoporate this Form into you solution and review it for the questions:
Issue 1. Background: The goal for this implementation is to keep this "Tree" from looking busy. One of the cell is going to show as checkbox only when the user is hovering over the cell. This cell is for user to select the row (instead of making the user learn Control-mouse click way of selecting). So I would like that checkbox to continue showing once it is checked. Question: I could get that behavior with some changes but as you will see, it does now work consistently. The checkbox cell stays visible when it should not and vice versa
Issue 2Background: I would like to an icon on each row in that band to signify some four processing states. State 1 (data not loaded) --> State 2 (data processing in progress) --> State 3 (data process complete and awaiting user to load data) --> State 4 (data fully loaded and available for use)User has to be able to click on the icon to initiate change of state.Question: How do I have clickable icon in a grid cell? I need to be able to detect the click and invoke code to initiate change of state.
Your Form with my enhancement is here I have added the event handlers directly in there, so I can simply import the Form without rest of the solution.
BTW strangely I do not see an attach icon when I compose this response.
In order to have a checkboxes that are shown on hover of a cell you should use IUIDrawFilter interface in order to skip drawing of the checkboxes if they are not hovered, more information about this interface you will find on the following link:
http://help.infragistics.com/Help/NetAdvantage/WinForms/2012.2/CLR4.0/html/Win_Draw_Filter.html
Regarding of a state icons, I suggest you to add unbound column (“State” ) of Image data type, and to load needed images there, then you could handle CellClick event and if the cell belong to state column to change its image.
I have implemented my suggestions in a simple sample, and I have used Visual Studio 2008 sins last time you were not be able to run my sample built on Visual Studio 2010.
I hope that this will helps you.
Hello Hristo,
Thank you very much for the sample. It is very helpful to have a working sample. And thanks for thinking about getting the solution in VS2010. That helped.
Have a look at the screenshot are from a Yahoo Mail inbox. For my business application, there is a key component which is expressed a hierarchy using an UltrGrid. For that component, I would like to emulate these behavior
With the example you sent me, I know how I can make icon change based on the mouse click but I would the behavior to be like Behavior 3. I do not want to see the cell highlighted as I click on the icon.
Your DrawFilter implementation is terrific. As I implemented it I realized one shortcoming in the way I defined my requirements. I realized users won't know there is a checkbox/delete icon until they hover right over that cell. I myself has a hard time figuring out where the checkbox was. That made me realize that Behavior 1 (see above) is really needed. The icon is lightened (instead of made to disappear) and when the mouse is hovering over the row the icons brighten. That way the user notice icon (checkbox/delete button)exists but being light it does not make the UI busy. What would it take to get that behavior.
Let me know on Behavior 1 and 3.
Thanks a lot! Really find your support incredibly helpful.
Thank you for the provided screenshot. I am not sure if your images are in separate columns and the cell borders are removed or they are into the cell that display text. However you could achieve your goal using HotTrakRowAppearnce and RowApperance in order to manage the appearance of the row based on if they are hovered or not. Also if the scenario is more custom you could apply different appearance on the row or cell object. Also I suggest you to review the following section from our online documentation regarding stilling of UltraGrid:
http://help.infragistics.com/Help/NetAdvantage/WinForms/2012.2/CLR4.0/html/WinGrid_Styling_WinGrid.html
Also I have modified my sample with my view point of how you could achieve this. Also in this sample I am reusing appearance regarding our performance guide:
http://help.infragistics.com/Help/NetAdvantage/WinForms/2012.2/CLR4.0/html/WinGrid_Performance_Guide.html
Please feel free to modify my sample based on your custom needs.
Thank you for your feedback. Please feel free to contact with us, or to start new Forum thread or to open a support ticket in our system if you need any further assistance with Infragistics Components.
Thank you for using Infragistics Components.
For the last several days, I have not gotten around to going back to my prototype for the effort I had been seeking help. I am going to have to need more help for sure.
Thanks for the followup Hristo! Your help so far has been invaluable. You will be hearing from me.
Hello,
I am just checking about the progress of this issue. Let me know If you need my further assistance on this matter?
Have modified the sample, I have removed SelectedCellApperance and instead I have set SelectedTypeCell to None.