.net - How to dock a view inside of a XtraGrid.GridControl? -


i have devexpress xtragrid.gridcontrol in winforms project i'm using master/detail setup multiple tables in dataset bound @ runtime. visual behavior of grid erratic in there dragable bar @ bottom of visible grid section in gridcontrol, not expand size of control when size of data changes.

in implementation, gridcontrol docked fill tab page occupies, , single exception works expected. grid using half of visible area available on form. issue because data on full screen of rows , detail rows, user must manually resize view dragging size bar bottom of screen.

i'm manually expanding each view registered, though issue persists when not automatically perform , allow user expand them clicking plus sign. here section of code programmatically expands view:

for x integer = 0 v.rowcount - 1   y integer = 0 v.getrelationcount(x) - 1     v.expandmasterrow(x, y)   next next 

i have looked way set gridview object 'dock' inside gridcontrol, have not found way to. there way make data fill gridcontrol/view automatically? thank assistance on issue.

usually you'll want have gridview each datatable want show in gridcontrol, when in runtime, need initialize same gridview each datasource/datatable want show.

//gridview view; view.populatecolumns(); view.optionsview.columnautowidth = true; view.bestfitmaxrowcount = 10000;   // or less ? depends on data vs preformance view.bestfitcolumns(); // may want limit of columns width foreach (gridcolumn item in view.columns) {     item.width = (item.width > 1000) ? 1000 : item.width; } //gridcontrol ctrl;    // if in form load  need force initialize afterwards. ctrl.forceinitialize(); 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -