Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > ToolBar > Exporting GridView Data using the Toolbar in an MVVM Pattern

Not answered Exporting GridView Data using the Toolbar in an MVVM Pattern

Feed from this thread
  • Kingsley Magnus-Eweka avatar

    Posted on Nov 10, 2011 (permalink)

    Hi Chaps,
    Can you please let me know if it is possible to use the export functionality of the GridView Control in the toolbar control - That is to have the export function happen from an icon in the toolbar control and also  can this be done in an MVVM way so that there is a clean seperation of communication (using commanding and messages as opposed to having the export function in the code behind)from the toolbar in the view and the ViewModel where the request for the export should be handled ? we have set up our solution using Prism MVVM Pattern.
    if possible can you please provide some sample code on how to do this.

    kind regards
    Kingsley

    Reply

  • Petar Mladenov Petar Mladenov admin's avatar

    Posted on Nov 15, 2011 (permalink)

    Hi Kingsley Magnus-Eweka,

     The RadGridView can export its data, but what are you going to export from the RadToolBar? Usually, RadToolBar is used to contain a Buttons,ComboBoxes, ColorPickers, Galleries, HyperlinkButtons etc.
    Could you please elaborate more on your feature request, what do you need to export ? Thank you  in advance for your cooperation. 

    Regards,
    Petar Mladenov
    the Telerik team

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

    Reply

  • Kingsley Magnus-Eweka avatar

    Posted on Nov 15, 2011 (permalink)

    Hi Peter,
    ok let me explain we are basically creating several screens and most of them need to have a Grid that has a column with a treeview control in the cell, on the rows of the Grid, clicking the treeview control in a cell of a row will reveal a nested Grid (master/Detail style or Parent/Child relationship style) connected to that parent Row of which it's Treeview control was clicked, in essence every row in the Main grid will have an associated nested /child Grid.This Master Grid will have a ToolBar on top of it where we want all generic associated functionality of the the Root(Main)Grid to be accessed from, such as Export functionality the Grid has as standard,
    we want to be able to call this functionality from the toolbar.So its just a case of replicating some functionality the Grid has but in a toolbar, the idea is we want to have a Base composite Usercontrol, comprising a Base Custom ToolBar and Grid, which can be re-used across all our screens as well as can be derived from so that all of our screens that need a Grid Control can use it, and we have a common control across all screens, we want to also do this the MVVM Route we are implementing Prism and CAB Library for Silverlight for this project. hope that explains it?
    regards

    Reply

  • Tina Stancheva Tina Stancheva admin's avatar

    Posted on Nov 18, 2011 (permalink)

    Hello Kingsley,

    You can create a RadButton control in the RadToolBar. You can set the RadButton Content to an Image and bind its Command property to an 'export' command from your view model. You can follow the approach demonstrated in this demo.

    Please give this a try and let us know if it works for you.

    All the best,
    Tina Stancheva
    the Telerik team

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

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > ToolBar > Exporting GridView Data using the Toolbar in an MVVM Pattern
Related resources for "Exporting GridView Data using the Toolbar in an MVVM Pattern"

Silverlight ToolBar Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]