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
240
Column Chooser Problem.
posted

I have a column chooser associated with my wingrid. I need to add some fields to the column chooser. I have used this code.

myColumnChooser.CurrentBand.Columns.Add("NewColumnKey", "Column1");

 

This column is appearing on the grid and columnChooser. But it is selected by default. I need it to be deselected by default while adding. Is it possible.? If so please give me the sample code.

I also have a doubt that if I have added a column like I have mentioned above, will it be bound the data of the table if it is the same column name as that of the datasource? So that the wingrid will show the column values. If there is any way to do that please help me. I need to fetch the database columns dynamically.

 

Thanks in advance.

 

Kishor Kodakkatil

 

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi Kishor,

    myColumnChooser.CurrentBand is the band in the WinGrid. So you are adding a column to the grid, not the ColumnChooser.You cannot add a bound column to the grid. If you want to add a bound column, then you would have to add the column through your data source and not through the grid.

    If you want it to be de-selected, you set the Hidden property on the column to true.

     

Children