Dynamic codebehind ColumnGroups and Excel Export

8 posts, 0 answers
  1. tony
    tony avatar
    7 posts
    Member since:
    Oct 2010

    Posted 02 Dec 2011 Link to this post

    Hi,

    I just got the newest version and was pleased to see the addition of merged column headers. However, We currently generate our ColumnGroups after a service call and while the columns show up properly, the groupColumn always shows up blank.

    public MainPage()
     {
     InitializeComponent();
     
     service.ServiceClient sc = newService.ServiceClient();
     sc.SaveFileCompleted += new EventHandler<service.SaveFileCompletedEventArgs>(sc_SaveFileCompleted);
     sc.SaveFileAsync();
    }
     
    void sc_SaveFileCompleted(object sender, fileSaveService.SaveFileCompletedEventArgs e)
    {
     RadGridView.ColumnGroups.Add(new Telerik.Windows.Controls.GridViewColumnGroup() { Name = "Vehicle_Info", Header = "Vehicle info" });
     RadGridView.ColumnGroups.Add(new Telerik.Windows.Controls.GridViewColumnGroup() { Name = "Dimensions", Header = "Dimensions" });
     
    //Further Column Definition
     
    }

    This will draw the columns properly, but will fail to render the columnGroups.

    I have attached a screenshot of what gets rendered.

    Secondly, we are trying to export from the grid with merged column headers and it doesnt seem to render the merged columns, I was wondering how we can get the merged columns as part of our excel export?

    Thanks!
    Tony
  2. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 08 Dec 2011 Link to this post

    Hi Tony,

    Thank you for the feedback ! I am treating these as feature requests . Both are reasonable - adding groups runtime should result in properly rendered column groups  and column groups should be included when exporting data.

    We have a service pack release planned within two weeks. I will do my best to have the improvements for you included.

    One more time thanks for the valuable feedback. I am updating your Telerik points.

    All the best,
    Pavel Pavlov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. AdrianP
    AdrianP avatar
    22 posts
    Member since:
    Nov 2007

    Posted 06 Feb 2012 Link to this post


    Hello Pavel,

    Has this feature been added? I also have the same problem, and I use the latest build: 2011.3.1220.1050.

    Thank you,
    Adrian



  5. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 06 Feb 2012 Link to this post

    Hi Adrian ,

    Please download our latest internal build and give it a try . In case you still experience any troubles please let me know.

    Greetings,
    Pavel Pavlov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  6. Frodi
    Frodi avatar
    1 posts
    Member since:
    Jul 2011

    Posted 15 Feb 2012 Link to this post

    Hello Pavel

    The merged column headers does not yet export. Is it possible to get an estimated time of when we can expect this feature. 

    I am using the newest internal build at this moment: RadControls_for_Silverlight4_2011_3_1413.

    Thank you
  7. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 15 Feb 2012 Link to this post

    Hello Frodi,

    In a few hours you should be able to download our new official release (Q1 2012) which does include the feature promised earlier.

    All the best,
    Pavel Pavlov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  8. Arun
    Arun avatar
    3 posts
    Member since:
    Aug 2013

    Posted 18 Nov 2014 Link to this post

    Hi,

    I have a scenario where i need to create GridViewColumnGroup dynamically from my Viewmodel. I have few fields to be displayed in the header like
    'Report Name':testReport
    'Total amount Collected':10000
    and etc.
    Report Name and Total amount Collected values will be bound to the group header only at the run time. How can i achieve this scenario ? Can anyone help with this ?

  9. Nick
    Admin
    Nick avatar
    593 posts

    Posted 19 Nov 2014 Link to this post

    Hi Arun,

    I am not exactly sure what your requirements are. However all of the Properties available in XAML are available in the code behind too. You can add and remove Column Groups through the ColumnGroups Collection in RadGrdiView. 

    Hope this helps. 

    Regards,
    Nick
    Telerik
     

    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
DevCraft banner