I have to hide rowselectors in ultragrid.
In InitializeLayout i have:
ug.DisplayLayout.Override.RowSelectors = False ug.DisplayLayout.Bands(0).Override.RowSelectors = False
It doesnt work. Even when its only statments there.
I used UltragridDesigner in Features i chose rowSelector to hide.
It doent work. They still there.
Also i tried reset Layout.
Same effect.
A few things to check: 1) Is this code actually getting hit? Maybe the event is not hooked up and the code is not getting executed. 2) If this code is getting hit, then the problem is almost-certainly that some other code in your application is stepping on it after this code executes. Are you calling grid.DisplayLayout.Load (or LoadFromXml)?Are you loading a Preset?
Try putting a button on the form and check the actual value of ug.DisplayLayout.Override.RowSelectors at run-time and make sure it's still set to False. I'd be shocked if it was.
Hello Marek,
I have tried to reproduce the behavior you described. I am using UltraGrid with version 21.1 On my side everything works as expected and I am able to Enable/Disable the RowSelectors feature. One thing that I found odd about this is that usually the row selectors are not present to the user, unless they are added from custom user control that contains the UltraGrid and has this property set to true or the row selectors are added in the code with the following line:
this.ultraGrid1.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.False;
Could you provide some more information regarding your scenario? For example, are you using some styles from the AppStylist or is the grid placed inside a custom user control?
Attached you will find my sample for your reference. Please test it on your side and let me know how it behaves. If this is not an accurate demonstration of what you are trying to achieve, please feel free to modify it and send it back to me along with steps to reproduce. Alternatively, if the behavior cannot be replicated, please feel free to provide your own sample. Remove any external dependencies and code that is not directly related to the issue, zip your application and attach in in this case.
Having a working sample on my side, which I can debug, is going to be very helpful in finding the root cause of this behavior.
Thank you for your cooperation.
Looking forward to hearing from you.
Regards,Ivan Kitanov
HideRowSelectors.zip