Last post Feb 02, 2016 02:36 AM by Zhi Lv - MSFT
Feb 01, 2016 06:15 AM|Yeoman|LINK
I would like to present a list of reports to the user. The user may select a report and then the report is created as a file and served via HTTP response to the user.
Also, I would like to "use" a ListView for this, because it presents the list of items in a familar way. I can prepare such a list in code, by defining a class "Item", building a List<Item> and finally bind the list to the ListView.
However, I would like to add parameters to each report. The point is that each report may have different parameters. This means that the items of the ListView have different content. So I cannot define
one item template. Instead, I need to build each item individually.
Here is an example list of items:
[ ] Include telephone numbers
( ) Conference Rooms
( ) Toilets
I believe that I need some callback/event procedure that is called when an item is drawn, and which has to provide the HTML content for the current item.
How can I do this?
Feb 02, 2016 02:36 AM|Zhi Lv - MSFT|LINK
According to your description, I suppose you could define a item template and put all of the fields into it. Then, you could set the Visible property to display or hide the fields.
If you don't want to use this way, I suggest you could try to dynamically create item templates. Here are some relevant articles, please refer to them: