Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
280
How do i add a column at the end when choosen from ColumnChooser
posted

hi,

 I have few columns that are initially hidden , they donot have a visible position set
 and When i use the columnchooser to add a column "B" to the ultragrid for the first time ,
 it is added at the end(cause there is no visible position set).When i add one more column "A"(visible position not set)
then it is added before the last added column("A").When i surfed for the reason i found out that the
column collection is a sorted collection.

My requirement is to add the column to the *** end of the Ultragrid when the user chooses it from
the column chooser.How do i acheive this??

Thanks in advance,
Vijay

Parents
  • 69832
    Suggested Answer
    Offline posted

    You could handle the BeforeColumnChooserDisplayed event and set the ColumnDisplayOrder property of the control that is used to display the columns:

    Example:
    this.ultraGrid.BeforeColumnChooserDisplayed += new BeforeColumnChooserDisplayedEventHandler

    void ultraGrid_BeforeColumnChooserDisplayed(object sender, BeforeColumnChooserDisplayedEventArgs e)
    {
        e.Dialog.ColumnChooserControl.ColumnDisplayOrder = ColumnDisplayOrder.SameAsGrid;
    }

     

Reply Children