This project has moved and is read-only. For the latest updates, please go here.

Dynamic Row Selection

Jan 8, 2014 at 6:08 PM
I'm sorry if my question appears to be silly.. Kindly Help...

In the below code,
public ActionResult SampleDownload1()
            var records = _getSampleInfoQuery.Execute();
                        var columns = new[]
                                  Column(x => x.College),
                                  Column(x => x.Amount, ExcelFormat.Money),
                                  Column(x => x.CreatedDate, ExcelFormat.Date, "Date"),
                                  Column(x => x.CreatedBy),
                                  Column(x => x.CreatedDate, ExcelFormat.Time, "Time"),
                                  Column(x => x.PercentageExample, ExcelFormat.Percent),
            return new ExcelFileResult<SampleInfo>(records) {ColumnDefinitions = columns};
I would like the user to specify the list of columns to be added to Var columns.

I would probably be passing array of IDs (or anything else?) of the chosen column like College,Amount,PercentageExample, the downloaded excel should contain only those columns.

Note sure whether i am putting my question in right. Let me know for any clarifications.

Thanks for your precious time Smile | :)
Jan 8, 2014 at 10:53 PM
Edited Jan 8, 2014 at 11:49 PM
Have put together a working example as well near your reality.

There is some form of solving the problem.
With this example failing to understand.

look link >
Jan 9, 2014 at 2:40 AM
Thanks leonardoFiorot