on 10-29-2020 5:20 PM
Hi Team,
We need to display time zone for the time field in samrt filter bar in read only mode.
I have tried with backend annotation using field control.
But its not working. Kindly advice me.
Regards,
Ashwini.
First in the xml, define the event initialized like so:
<smartFilterBar:SmartFilterBar id="smartFilterBar" entitySet="myEntity" initialized="onFilterBarInitialized>
<smartFilterBar:controlConfiguration> <smartFilterBar:ControlConfiguration key="Bukrs" visibleInAdvancedArea="true" index="0" groupId="_BASIC" preventInitialDataFetchInValueHelpDialog="false"></smartFilterBar:ControlConfiguration>
</smartFilterBar:controlConfiguration>
</smartFilterBar:SmartFilterBar>
Then in the controller you just have to call the event:
onFilterBarInitialized: function (oEvent) {
var oSmartFilterBar = this.byId("smartFilterBar");
if (oSmartFilterBar.isInitialised()) {
oSmartFilterBar.getControlByKey("Bukrs").setEnabled(false);
}
And voila , the field will be read-only. You can also assign it tokens in the same event if you want prefilled values.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.