Hi
i am using ultraToolbarsManagerMain to open form in Tab at run Time.when i click on
ColumnChooser (on Grid's column chooser button)then column choser is appear.how can i set the location of it.
i want that it must be open near the Grid's column chosser button.
i am trying to use
private
e)
{
e.Dialog.ColumnChooserControl.Location =
(ultraGrid.Location.X,ultraGrid.Location.Y);
}
but it is not work.may be it is needed to add also ultraToolbarsManagerMain height .how can i get the X and Y position of
ToolbarsManagerMain .
Hi Dilip,
That dialog is created by the grid and the grid is responsible or it. You should not be disposing it or setting DisposeOnClose.
Hi .
its workin fine but ,i am setting DisposeOnClose property is True.because i do someting code when application is minimize or we swift one form tab to another form tab..
DisposeOnClose property is True is may be Reason that when i click on
ColumnChooser then it appear at default position and after then it is show really position(which set via according your code.).
the user see like flickering(Column Chooser) on screen .
e.Dialog.DisposeOnClose = Infragistics.Win.
.True;
can we stop it(flickering(Column Chooser) )?
Please help me.
Thanks
Dilip
its working fine.
Thanks :)
It looks like the location of the dialog is set internally after the BeforeColumnChooserDisplayed event is fired. So you will not be able to set the location inside that event.
What you can do is delay the setting of the location by invoking a method to set the location, rather than setting it directly inside the event:
private void ultraGrid1_BeforeColumnChooserDisplayed(object sender, BeforeColumnChooserDisplayedEventArgs e) { UltraGrid grid = (UltraGrid)sender; grid.BeginInvoke(new PositionColumnChooserDialogDelegate(this.PositionColumnChooserDialog), new object[] { e.Dialog, grid }); } public delegate void PositionColumnChooserDialogDelegate(ColumnChooserDialog dialog, UltraGrid grid); private void PositionColumnChooserDialog(ColumnChooserDialog dialog, UltraGrid grid) { dialog.Location = grid.PointToScreen(grid.Location); }
I am using this Way
e.Dialog.Location =
.Location.Y + ultraGrid.Location.Y));
Please Help me.. it is not work