Hello everybody!
I am using an ultrawebgrid in Hierarchical display mode to create dynamic controls for a type of registration page. The issue I have come across is that I don't need the expansion capability of the rows enabled because I have them auto expanded. Does any one know how to hide the expansion controls of the rows?
TIA -
Patrick
Hello everyone,
Just wanted to post the solution:
I made a jpeg image: 14x13 with a background color the same as the background of the datagrid or page.
I used this image as the setting for displaylayout.images.Colapseimage and displaylayout.images.expandimage. This effectively hid the icons used for expand and collapse. Of course they are still visible and clickable but they are the same color as the background. Next, I set the property: Expandable default to No. Since I am expanding all the bands in code behind, I have the desired results of an expanded hierarchical datagrid that has no expansion icons visible. This is great for dynamic control creation! Very easy!
Hope it helps someone.
Praveen -
Thanks for your reply. I actually just want to hide the icons because it will look more "professional". I guess i could create a custom css style with appstylist that simply has a white square image that matches the background of the grid instead of the plus and minus icons. I was just wondering if anyone had a better work around in code. Also, thanks for the code to cancel the expand and collapse calls. However, in this case, if the icons are visible I would rather they be functional.
Instead of playing with the styles to hide the expansion indicator my suggestion would be to cancel the events for AfterRowExpandedHandler and AfterRowCollapsedHandler.
function AfterRowExpandedHandler (gridName, rowId)
{return false;}
let us know if this does not work for you, then we can think about hiding it.