on 01-06-2015 9:57 AM
Hi..
I am just started to learn UI5, i wanted to create table where its columns depends on use selection.
Ex:-
I have two option in screen From Date and To Date
if user selects From :- 10/01 To:- 20/01
Then my table must contain following columns
10/01 11/01 12/01 13/01 14/01 15/01 16/01 17/01 18/01 19/01 20/01
Is there any way to do it. If user selects another Dates then it must display another dates .
I am using XML file for view and JavaScript file for controller .
Thanks
First of all, note that the columns are just a regular aggregation like any other (e.g. the rows or items aggregation).
There are two options I can think of:
a) Programmatically: Destroy the columns aggregation (see destroyColumns in the API doc) and then manually adding columns via addColumn based on the date range that you have.
b) Model-driven: as the columns a regular aggregation, you can bind them to a model. You would then need to populate the model based on the date range and then, the columns update accordingly.See the documentation on aggregations for details: SAPUI5 SDK - Demo Kit
Personally, I would prefer option b. You can play around with those approaches. Make sure to include a code sample (e.g. JSBin) if you get stuck anywhere along the way.
- Max
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.