UniGridMenu functionality in transformation

Alena Mikhalchanka asked on June 25, 2015 11:42

Hi, everybody! I use Basic Repeater Web Part to display data from external DataBase. Of course, I use transformations to display my data in table form correctly. Please, help me with advice how to input UniGridMenu functionality (export of displayed data) to my transformation. I understand that it is possible to write Custom Web Part but I think and I want to use maximum of possibilities of Kentico CMS. Thank You in advance :-), Alena

Correct Answer

Brenden Kehren answered on June 25, 2015 18:57

You won't be able to include the UniGrid's export menu without writing some custom code. In fact the export is very easy to write, see below. In a button click you can run the code here and get your export file.

    DataSet ds = <get your data here>;
    DataExportHelper eh = new DataExportHelper(ds);
    eh.ExportData(DataExportFormatEnum.CSV, this.Page.Response);
1 votesVote for this answer Unmark Correct answer

Recent Answers


Joshua Adams answered on June 25, 2015 16:01

One thing you may be able to do would be to develop a new web part, but use the unigrid control inside of it, so that all of your functionality will be there that you wanted. If you reference the unigrid control in your webpart and then use it, all you would have to do is set the data or object type throught the code or a property, and then you can apply your transformation through the code as well.

There may be an easier way, but this should work regardless. Im not sure of the effort it would take to do that advanced export on the repeater, so thats why I am recommending this approach, unless someone else has found an easy way of making that happen.

1 votesVote for this answer Mark as a Correct answer

Alena Mikhalchanka answered on June 29, 2015 06:48

Thank You very much for advices! Alena

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.