Hello,
I have UltraWinGrid with one band and several columns. Now i search for a possibility to hide some columns if in the first column is a Special value (*).
How can I do this?
The Grid Show look like this:
Test1 Test2 Test3 Test4
* Only Text from column no4 now there is just one cell with this text
Test1 Test2 test3
Thanks
Hello Judith,
Thank you for posting in our forum.
If I understand you correctly what you need is when a particular cell contains some special value to span that cell over the next neighbor cell to the right. If this is what you need you can achieve such behavior by implementing the IUIElementCreationFilter interface. In your implementation you can set the cell’s UIElement width of the cell that contains special text as big as it is necessary to overlap the next cell. You can also set the width and height of the next cell to zero so it will not be visible. More about IUIElementCreationFilter you may find by following the next link http://help.infragistics.com/Help/Doc/WinForms/2015.1/CLR4.0/html/Infragistics4.Win.v15.1~Infragistics.Win.IUIElementCreationFilter.html.
In the attached sample solution I have implemented this approach. Please check my sample and let me know if this is what you are looking for of if I am missing something.
Thank you for using Infragistics Controls.
Thank you! This is the right direction. Thank you for the sample! I changed some things for me..but it worked. (I Need the case...cell 1 is * and then another cell gets bigger)
Ok, it worked..
BUT..if you take some more rows in the grid the performance is horrible!!! :-( Just take 40 rows in your sample and then write a * in a cell....
Do you know another way?
Sorry, after Insertion of several * the Performance is horrible. Not after the first, but aber 5-6
The Problem is: my grid has sometimes more than 2000 rows. Some users Change one row or Import with a button many rows.....
Thank you so much!!!
This is exactly what I need. It works fine! :-))
Thank you for your help and samples. This forum is wonderful!!!!!
Thank you for your feedback.
The slowest part in the Creation Filter was GetUIElement method. I have implemented the creation filter without this method. I have tested this by scrolling the grid in all direction, changing the cell texts, and resizing the form.
Please check this optimized solution and let me know if you face the same issue again.
Sorry, I have another question: Is it possible to cancel the painting? Or : Why is the Performance so horrible when about 10 rows with * are in the visible area? Do you have any ideas?
If not: Is it possible to split one datatable in two bands? so that i have the comments in the first band and the other rows in the second???
Ok, this is interesting.
I think the Performance is bad when more than about 8-10 rows (in the visible area) are * . Try your sample with "row mod 2 =0" and not 7. Or type in some rows a * ..after few rows the Performance gets very bad.
So sad!
Thank you so much. That is exactly what I Need.
Unfortunately the performance is bad. But just in my Project. I think the reason is because we have written so much Special Events like keydown, enteredit and so on which check the text of the columns...
I try to fix this... Hope I can do this.
Is it possible to decide in code when the cells are painted? I think the BeforeCreateChild-Method is to often busy
Thank you!