[ ] bug
[X] feature request
[ ] enhancement
It would be great if there were options to export the data from the datagrid similar to the way datatables.net handles it including Excel and PDF formats. Provide buttons to select the export type. Provide render options on cells to specify how the data is rendered when exported. Allow users to include/exclude columns when exporting.
@jbgarr seems like this is more of a specific functionality outside of the exact requirements for a datagrid. Seems like implementing this would only implement a very thin layer of shared code that does not provide enough value to be a core part of the datagrid.
Could you provide more details on why you think this should be part of the core functionality of a datagrid?
@jaffoneh While sorting/filtering data in a web app is great, to really DO anything with it requires some way to export it. There are many times that customers/clients/end users want to take their data "with them" so they can interact with it locally. They want to use the datagrid as a starting point that they can expand on with Excel, or share via a downloadable PDF. The full potential and usefulness of a datagrid is sold short if the data is always stuck in the constraints of a web browser.
@jbgarr assuming that data needs to be taken outside of a web app to be completely useful isn't the correct assumption for the use of a datagrid. We've been working with dozens of product teams building pretty complex apps in multiple companies using Clarity and a handful of them use export functionality for specific reasons (like auditing). The assumption that data is useful only if taken outside of a webapp introduces a completely new pattern to the use of that web app that seems specific vs. default or generic. The ability for customers to take data outside of a web app with them (via an export functionality) does not seem to be a feature of the datagrid itself (vs. a feature of the application that provides that ability). The shared code that a datagrid component can provide (vs. the functionality an app can provide on top) it pretty small to be useful as part of the component.
@jaffoneh I agree that it's not the correct assumption to say that a datagrid is not completely useful unless the data can be exported, however, I do think the feature would be very welcomed. It's a built-in feature among other datatable/datagrid components/plugins (including datatables.net, Kendo UI, PrimeNG, and ag-Grid to name a few) and that was the basis of my request. Considering the datagrid is responsible for rendering and displaying data I don't think it's out of the question to say that it makes sense that the datagrid also offers the option to export the data. I've used the export feature from datatables.net (the jquery datagrid plugin) in a number of web apps, and this is a must have feature for our clients. I realize not every developer will need this option. I do know that I would be extremely happy to see the feature added though 馃槃 . Either way, thanks for your time and the great work with Clarity so far!
@jbgarr thanks for clarifying. If you could provide more examples on the way you'll be using it that would be helpful (although pointing at other examples already gives us context). I am CCing @youdz to get his opinion on how much of this can we include in our datagrid component that is useful enough to build this feature.
My main problem with this feature is that we allow any kind of HTML in the cells, which is perfect for customizability but _not_ exportable. Because of this, we'd have to ask you for the exact data to export for each cell (well, each column given the row's item).
And this is where it bugs me: if you're giving us N functions for N columns to export, all you have to do is literally concatenate that with commas and you have a CSV export (for excel). That's all _we_ would be doing anyway. This is what Jehad meant by:
The shared code that a datagrid component can provide (vs. the functionality an app can provide on top) it pretty small to be useful as part of the component.
Maybe I'm missing something, some part of the feature that would require more code on our side?
In terms of use cases, we offer a dashboard type of user experience that is data intensive. Our users have access to a number of tables (currently built with the datatables.net jquery plugin) and all of them offer the ability to export as either an Excel file or PDF. We are looking to convert our existing app to Angular2 (and already have 2 companion apps of smaller size and scope built/under development with Angular2). The conversion will be a huge undertaking and I need to be sure that the tools/components/frameworks we choose will offer our users the same experience and features they are used to.
Unfortunately I have not dug into the datatables.net codebase to see what the export features they offer entail (they allow for Copy, CSV, Excel, and PDF exports). I know they offer both HTML5 and fallback to Flash based methods for handling export (although the Flash fallback is there for older browser support, so wouldn't be necessary in Clarity). I'm at the end of my insight here though and can't offer much else to entice you into the idea of offering export options for the datagrid component. Maybe some other folks can chime in and provide more reason for this feature to be added.
@jbgarr thanks for providing the background, this really helps. I'll take a deeper look into what would this mean to us and datagrid in Clarity. I'll keep the issue open as we do that.
Feel free to reach out to me directly if you have more information you'd like to share about the product you're trying to move to Angular 2 and how Clarity can help.
@jaffoneh Thanks a lot for the offer. I appreciate it. And thanks for keeping an open mind on this feature request.
@jaffoneh I would actually like to take the opportunity to tell you more about the product I'm working on, but not sure the best way to touch base with you. Where can I find your contact info? Thanks and looking forward to touching base.
@jbgarr sure, want to reach out on twitter (@jaffoneh) and we can plan from there? I am also happy to get in touch with you if that's easier! Excited to take a look!
@jaffoneh great, I just sent you a message on Twitter. Looking forward to continuing the conversation via email - I've provided my contact info in my Twitter message. Thanks!
We looked at this issue closely and tried to figure out what this means for the datagrid. We haven't received many requests for this and we believe it is currently out of the scope of core datagrid features. I am closing this for now, if we get more attention on it or discussion around, we could reopen it.
Hi there 馃憢, this is an automated message. To help Clarity keep track of discussions, we automatically lock closed issues after 14 days. Please look for another open issue or open a new issue with updated details and reference this one as necessary.
Most helpful comment
@jaffoneh great, I just sent you a message on Twitter. Looking forward to continuing the conversation via email - I've provided my contact info in my Twitter message. Thanks!