I have a grid that displays images based on a category selection box next to the grid. For example if the all photos tab is selected, the grid displays all photos. If the hawaii tab is selected it only displays photos from hawaii. I have a mediaStore that keeps track of all the images.
bbar: new Ext.PagingToolbar({
pageSize: 25,
store: mediaStore,
displayInfo: true,
displayMsg: 'Displaying images {0} - {1} of {2}',
emptyMsg: "No data to display"
})
Here is the code i used to display the paging tool bar. It works perfectly for the all photos tab but when i click on any other category, say a category that has 50 photos, it displays 1 page of 2 with the next and back buttons. If you click on the next button, the grad switches back to displaying the all photos category and the page number jumps from 1 of 2 to 2 of 5 instead of 2 of 2. Does anyone know what the problem could be?
This is because your mediaStore still contains all the records (image details). The filtering is just hiding the rows. Call the load method after you call the filterBy method:
mediaStore.load(mediaStore.lastOptions);
I ended up setting the baseParams to contain a selectionid and initially set it to '' in the jsonstore.
baseParams:
{
selectionid: ''
}
then when a selection is changed i modified the value of the baseParam using
mediaStore.setBaseParam('selectionid', record.id);
Related
I have an interactive grid inside a modal dialog page which has to display this associative table :
SELECT PK_FK_ARTICLE,
PK_FK_SERVICE,
PK_FK_ETAGE_BUREAU
FROM INV_TB_POSSEDER;
CREATE TABLE inv_tb_posseder(
pk_fk_article INT,
pk_fk_service INT,
pk_fk_etage_bureau INT,
CONSTRAINT ct_pk_posseder PRIMARY KEY(pk_fk_article, pk_fk_service, pk_fk_etage_bureau),
CONSTRAINT ct_pk_fk_service FOREIGN KEY(pk_fk_service) REFERENCES inv_tb_service(pk_service),
CONSTRAINT ct_pk_fk_etage_bureau FOREIGN KEY(pk_fk_etage_bureau) REFERENCES inv_tb_etage_bureau(pk_etage_bureau),
CONSTRAINT ct_pk_fk_article FOREIGN KEY(pk_fk_article) REFERENCES inv_tb_article(pk_article)
);
ALTER INDEX ct_pk_posseder RENAME TO ind_pk_posseder;
CREATE INDEX ind_pk_fk_service ON inv_tb_posseder(pk_fk_service);
CREATE INDEX ind_pk_fk_etage_bureau ON inv_tb_posseder(pk_fk_etage_bureau);
CREATE INDEX ind_pk_fk_article ON inv_tb_posseder(pk_fk_article);
Here's how I configured the Interactive Grid :
Pagination set to Scroll
Heading set to Region with a height set to 850px
My 3 columns have their values based on a LOV, which makes it easier to read the values instead of just numbers :
When I open the page and scrolls through the records (about +400 rows), no rows are displayed after the ~40th row :
What I tried and found :
I already tried to set the Pagination to Page, but the records doesn't show after the 3rd page, and I can't go back to the previous pages.
I tried to set the Heading to None, but then no rows appears.
If I apply a filter on a column, the rows appears, even more than 40 row !
I also found that if I remove the LOV on the first column PK_FK_ARTICLE, all rows are showing, but it's not useful, I have to display the LOV on the 3 columns.
The interactive Grid has a static ID called donneesList which is used for JavaScript, to remove some functions on the Interactive Grid :
$("#donneesList").on("gridactivatecolumnheader", function(e){
setTimeout(function() {
$("#donneesList_ig_column_header_menu").find("[data-option='freeze']").remove();
},1);
});
let actions = apex.region("donneesList").call("getActions");
actions.hide("selection-copy-down");
actions.hide("selection-copy");
actions.hide("selection-fill");
actions.hide("selection-clear");
actions.hide("single-row-view");
actions.hide("selection-duplicate");
actions.hide("row-duplicate");
I've seen some similar posts on the Oracle Forum and here on SO but none of the solutions seems to work for me
Thanks in advance,
Thomas
I have an issue connected with antd table pagination. I want to make a custom pagination and show 3 items per page at a table. So I am slicing my data into a 3 elements. Everything is ok at a console :) But when I set my array as a dataSource prop at first page everything is ok too. After clicking on a second page e.g it's like overriding previous page's data and shows on a second both data. I would be glad to know your opinion what's wrong in this code.
<Table
dataSource={investmentReturnsData.quarter1.data}
columns={this.investReturnColumns}
className="c-table c-table-default c-table-dashed hide_head paging_right"
pagination={{
pageSize: 3,
total: investmentReturnsData.quarter1.count,
onChange: (current) => this.getInvestmentReturnData('quarter1', current),
}}
/>
const slicedArray = returningData.slice((currentPage - 1) * 3, currentPage * 3);
i want to design a webpage that is to show about 700 rows from Database.
webpage is : http://www.shefacenter.ir/fa/disease
Data to show is: [Subject] & [Comment]
i get data from DB and show them simply in Unordered List (ul).
the code is like:
<div class="box_list_container">
<ul id='list_ngm' class='list_1column' >
<li><span>Subject</span><p class="list_comment">Comment</p></li>
<li><span>Subject</span><p class="list_comment">Comment</p></li>
<li><span>Subject</span><p class="list_comment">Comment</p></li>
...
<li><span>Subject</span><p class="list_comment">Comment</p></li>
</ul>
</div>
after that, i ADD some simple jQuery code to Switch Showing this List as 3 different Classes:
[Show Results in 1 Column List]
[Show Results in 2 Column List]
[Show just Subjects of Results]
< this 3 mode has 3 different CSS class that they works fine. >
NOW, My Problem Starts over here:
when i switch showing results between that 3 modes, the Browser Scrollbar has Remains the Largest Height of List after switching.
Notice:
i have use "replaceWith" FROM "jquery-2.0.3.min.js" to change current Class of for have a [1 column],[2 column] or [just subjects] show!
Any idea is appreciated.
i tried more and more to find the right way to solve that bad problem.
and finally i found that.
the tags, should have a "display:none" property at first. and after page loaded, with jQuery i change them to "display:block" .
thats it!
For some reason the rowIDs get reset once i do any any action from the pagination(increase the number of rows,move to next page etc)
for e.g i have 75records in total.Im displaying 15records at a time.In total i have 3 pages each can display 15records.When im in first page which is displaying that records from 1-15 i get rowIDs 1-15 for rows.Now when i move to next page which displays records from 16-30 i get the rowIDs 1-15 for rows.Here when i moved to new page where 16-30 records are being displayed i was expecting the rowIDs to be from 16-30 but they are not,they are from 1-15.Same thing happens when i do an action from pager to display 30 records at a time instead of 15(default).
I want rowID starting from 1 to n number of records instead of 1-15 for each page.Is there a way to do it? If yes than please help me out.thanks
Row Id will work this way because it generates dynamic Ids for your rows when your data is populated in the grid. This is the default behavior.
You can get a unique row Id if you set a Primary key. this way, you'll get the value of Primary key as row Id. Simply set key: true property of the column you want to set as primary key, in the colModel collection.
As you can see in the following screenshot, the SuperBoxSelect component can show multiple selected items on the same line e.g Conneticut and Florida
I would like to change this behavior so that each selection is shown on its own line
try setting stackItems property to true
stackItems When set to true, the items will be stacked 1 per line. Defaults to false which displays the items inline.
stackItems: true