SmartTable How to use setIgnoredFields method - sapui5

I'm trying to update a SmartTable to disable column rendering and table personalization for selected columns using the setIgnoredFields method from the API.
However, after accessing the control instance and using the above method, following error is displayed in the console:
Property ignoredFields cannot be changed after the SmartTable with id "idListReport" is initialised.
How do we access the SmartTable control instance (before it's initialization?) and use this method so that certain columns can be hidden in table display and personalization?
(Tried this in the onBeforeRendering method in the view - however, the control seems to be already initialized by then.)

Do you need to set it dynamically?
If not, please use
<smartTable:SmartTable id="idListReport" ignoredFields="a, b, c"

I have used setIgnoredFields method in View Initialization instead of onBeforeRendering and it worked.

If you want to use dynamically then use this in init method sap.ui.getCore().byId("#tableid").setIgnoredFields("property1,property2,...");

Related

how do I get a variable in scoop in swift so I can pass it data?

how do I get my serialnumberLabel in scoop of the itemsviewController when its in a different file and where would I put it because I'm new to swift I know very little please help
You should reload current tableView in completionHandle closure and store text in ItemsViewController, then update serialNumberLabel.text in tableView(_:cellForRowAt:).
You need to change logic by steps:
Step1: Make a list common model for table view
Step2: when you modify item you set for model common in table view.
Step3: when you callback item you can only call reload table view.
All done.

AgGrid "serverSide" rowModel doesn't recognize custom overlay components (loading and noRows)

The problem is that I can not make ag-grid-react to show custom components for loadingOverlay and noRowsOverlay automatically (meaning managed by the grid itself). I've done all like described in the docs.
These are my options:
frameworkComponents={{
customOverlayLoading: CustomOverlayLoading,
customOverlayNoRows: CustomOverlayNoRows,
}}
loadingOverlayComponent="customOverlayLoading"
noRowsOverlayComponent="customOverlayNoRows"
Interesting thing is that it works for "clientSide" row model, e.g. when using prop rowData={undefined} - loading or rowData={[]} - noRows.
But when I replace rowData with rowModelType="serverSide" the grid then does not recognize new components for overlay.
There is no mention in the docs that this thing only works with clientSide row model. So I expect it should work. The way I can make it work is through the grid API. But I expect from that feature it should handle loading and noRows automatically for each of row models. The problem with the API usage is that there is no flag that points whether it is loading or not
there is the stackblitz reproduction. To check serverSide rowModel enterprise version needed
https://stackblitz.com/edit/ag-grid-ro-model?embed=1&file=index.js
When you're using rowModelType='serverSide', you need to call overlays yourself inside getRows() where you're implementing datasource.
gridApi.showNoRowsOverlay(); // show NoRowsOverlay
params.successCallback([], 0); // Pass empty array, Zero for lastRow
It will work. :)

Not able to set value for Ext.ux.form.MultiSelect in ExtJs 3.4

I am using ExtJs 3.4.
When i set value to Ext.ux.form.MultiSelect, I am getting this error.
"Uncaught TypeError: Cannot read property 'clearSelections' of undefined in MultiSelect.js:245".
If I have to clear the selected values in "Ext.ux.form.MultiSelect" before setting the selected values, then how can i do that.
Please give suggestions for this.
If you mean this component, then in setValue method there is call to this.view.clearSelections(), and that probably causes issues. view is created in onRender method. So your combo is probably not rendered when you call setValue.
I see 3 solutions:
Ensure combo is rendered when you call setValue
Check is combo is rendered; call setValue when it is, assign value when it isn't
Override MultiSelect and fix it

Eclipse RCP - Programmatically setting a view to not be closeable

I'm trying to create an RCP view that is not closeable. I need a way to set this property programmatically because I'm creating views with secondary IDs in in the code. I can't do it through the extension editor dialogs because of this.
Is there a way to remove the x from a view programmatically?
I was finally able to figure this out.
In your perspective's createInitialLayout() function you can get the layout of the view and set its closeable property:
IViewLayout vLayout = layout.getViewLayout(View.ID);
vLayout.setCloseable(false);
This will work for views with secondary ids too. The code would be exactly the same in that case, because it will apply the closeable property to all secondary views that share the same primary id.
I've found that the following won't work:
IViewLayout vLayout = layout.getViewLayout(View.ID + ":1");
vLayout.setCloseable(false);
So you can't make individual views closeable based on their secondary ids. Either the whole group is or isn't.
You can do it easily.
Just set the closable property of view to False.
IViewLayout layout= layout.getViewLayout(View.ID);
layout.setCloseable(false);

SilverLight 4 DataGrid & MVVM: Using SelectionChanged trigger to check checkbox, but NotifyPropertyChanged causes crash

I have a DataGridCheckBoxColumn in my DataGrid which is to indicate the rows the user has selected. I want the checkboxes to be checked/unchecked with a single click. Making the column editable (i.e. IsReadOnly="False") means the user has to click twice (first click just selects the row, 2nd click changes the checkbox), so I decided to set/clear the property the column is bound to in the view model code in response to the SelectionChanged trigger firing.
Setting/clearing the property works fine, however as soon as I call NotifyPropertyChanged("name of collection the grid is bound to") to get the view to show the change, this causes the SelectionChanged trigger to fire again. This loops about 10 times until an exception is thrown.
If I remove the call to NotifyPropertyChanged, the SelectionChanged trigger fires once, but of course I don't see any change in the UI. The collection is a PagedCollectionView if this makes any difference.
How can I get this to work? Note - I am using MVVM pattern, so everything is done with bindings to View Model (no code behind).
Thanks
Sounds like you have a infinite loop by design.
but try using the selectionchanging instead of selectionchanged,
or put a isloading flag in your viewmodel and dont call the inotify if the isloading is true
I found a very simple solution that doesn't involve triggers or code behind. See: Silverlight single-click checkbox DataGrid columns
It seems to work by using a column template, but only providing the CellEditingTemplate and no CellTemplate.