how to refresh ui-grid before apply data sorting - angularjs

I need to sorting an ui-grid table rows ascending and descending in base to one column selection. My problem is When I call to the api it only give me the last 100 results, so If I try to show the 100 littlest results I need to send new request to the api and refresh table data.
What is the best way to refresh the table data when user click on the sorting button and Before apply the sorting function?

Related

Material Table Get Rows After Lookup Selection

I want to access all rows after anyone filters a data after lookup selection.
For example, here I should get second row data after istanbul is selected. Is there any functionality resonating the feature of what we can call as "onLookupChange" in Material Table?

Is there any js function function to fetch the complete data from pagination

My task is to enable the user to select only a single row from the entire table by using checkbox.
When user select any single row , checkbox for the other rows are disabled. But this is happening only on single page.
Since my table has large amount of data and pagination is applied. The above mentioned logic is functioning properly but when I move to other page of table , there user is again able to select some another row but this should not happen as the requirement is that user should only be able to select a single row throughout the table.
3)Help me out in telling that how to fetch the entire data from the table where pagination is applied because document . Get Element By Name only functions on single page and not on entire table
Keep a variable in the state selectedRowId, every time the table renders enable checkboxes on the bases whether selectedRowId is null or not.

sort the fixed data table on the click of a header

I have a fixed data table which is rendered in the order of the API response.
I want to sort the table on the click of an header primarily an 'id' in Ascending and Descending order
Is there a simple way to implement it from other than the example given in the docs

Does af:select one choice supports range size concept?

I have select one choice component dragged on to the page as filter. I have around 20 columns and each column is having select one choice as filter. and each filter having more than 1000 records. So, as the record count is much it is taking much time to load the page so, through view Accessor I have tried to display the data on to my component.
Still it is fetching all records in case soc. Is there any way to restrict the selectonechoice component to fetch all the data?
Yes. Use iterator's property rangeSize to limit selectOneChoice record count in case that you using separate ViewObject for this LOV.
If you use embeded LOV for ViewObject attribute, then you need to edit corresponding accessor's property, tuning section. Retrieve row from database, only up to row number. Set required value there.

Maintain ngRepeat order while bound data changes

I am new to Angular and I am now learning about directives.
I have created a directive that will create a table.
You can sort the table by clicking on the header arrows.
You can also edit/delete a row by clicking on the action button.
The problem with my table is that when the rows are sorted by some column,
and I edit an item under that column, the table resorts because of the changed data. Thus my currently editting item moves to another row and the current input fields contain a different one.
For example, if I sorted the table by visits, and then I edit a visit data in a row,
changes to :
How can I maintain the current order of the rows during edit,
and only allow resort when I click on the apply button (check) ?
You can copy the model which will be edited during editing. And in your save function, update the actual model in table list.

Resources