RadGridView for Unknown numbers (1-n ) Columns

2 posts, 0 answers
  1. Anand
    Anand avatar
    12 posts
    Member since:
    Apr 2014

    Posted 17 Oct 2014 Link to this post

    I have a requirment where User have a functionality for Add & Remove of Columns It will be 1 today and can go for N in Future. Like Show history from year 2011 to 2000 & it may show 3 columns for each year.

    Now is is possible that I can have some Dictionary collection binding for GridView As I can't bind this to some object as i don't know how many columns will come in near future.

    I've bind a RadHeaderContextMenu with is bind with a Command on this I've to do this Add Remove of Columns. What Kind of Object I should have for GridView Itemssource & how to Add / Remove these Columns ?
    Please Help. 
  2. Dimitrina
    Dimitrina avatar
    3769 posts

    Posted 21 Oct 2014 Link to this post


    RadGridView.Columns collection is an ObservableCollection<GridViewColumn> and it expects column instances.  As to defining the columns, you can find the Defining Columns help article on how to define a column in code behind. 

    I would also suggest you checking the MyColumnsBindingBehavior.cs in ComboBox Column online demo.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top