c# - DevExpress XtraGrid is not visible even after I set Visible = true -


i'm using devexpress' tools on current winforms project. page i'm working on has grid sub-agencies visible or not depending on flag called isparentagency. if agency parent agency, grid should visible of agency's sub-agencies. if not, grid should invisible.

no matter do, though, can't seem grid visible. after i've given data source, forced initialize, , populated columns. i've tried going right ahead , setting subagenciesgridcontrol.visible = true. no matter has visible set false (even when debugging line after subagenciesgridcontrol.visible = true).

here's code i'm using set grid , toggle visibility (i'm using mvp pattern on top of winforms):

subagenciesgridcontrol.datasource = model.subagencies; subagenciesgridcontrol.forceinitialize(); subagenciesgridview.populatecolumns(); subagenciesgridcontrol.visible = model.isparentagency; 

how can grid visible? adding controls, shown in comments.

if you're using layoutcontrol try setting layoutcontrolitem's visible property. control's own visible property doesn't come play if you're using layoutcontrol layout rendering.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -