3.2.0

Setting Tab Values

I have a grid that is filtered by a tab object and two select objects. For example, when the user clicks the tab marked "A" the grid shows only the rows that start with the letter "A". Then the user drags down to "End User" in the select object, it shows only the rows that are end user customers starting with "A". This is all working fine.

The problem is that I want to add a button that will reset the tab and the filters to "All" (the default value). This works fine for the select objects, but when I try to reset the value of the tab, it only changes the display and not the underlying value. After the reset button has been pushed, the tab shows "All", but the grid still acts as if the tab were on "A".

I am using
objTab.setSelectedItems([26]);
to set the tab through the button, but I can't seem to set the underlying value. I tried
objTab.setItemValue(26,"All");
but this didn't work (I didn't really expect it to). Does anyone have a way to do this?
David K
November 7,
Here is a link to the page with the bug:
http://www.pjm.com/services/membership/member-list.html
David K
November 8,
Hi,

Seems to work fine for me.
I tried selecting Electric Distributor and then tab A.
Then click on Reset Grid and it goes back to showing all the records.
I used IE7.

BTW, there seems to be a problem with the position of the reset grid button in firefox 2.0 - it covers up the tabs labeled X, Y, Z and All.

Ankur
Ankur Motreja
November 8,
Ankur, it has the behavior you described. BUT if after selecting electric distributor and then tab A, you select electric distributor, it will show only the electric distributors starting with A.

Thanks for pointing out the error in Firefox. I'll check it out.
David K
November 9,
I went back to only resetting the filters, not just the tabs, but I would like to implement the reset button to reset the tabs also. It's not a big deal, but if anybody could explain how the selected tab value can be accessed, that would be great.
David K
November 10,
David, not really sure if this could help ... but
I notice that your (showAll) and (filterCompany) functions differs a bit.
When the reset-button is clicked you can act like you really click on a tab by call:
objTab.onItemClicked(e,I);
So you can re-use filterCompany function for both ( initial load and show-all after filtering)
resetButton.onClick = function(text){
objTab.setSelectedItems([26]);
document.all.sector.value = "All";
document.all.tipe.value = "All";
objTab.onItemClicked(event, objTab.getSelectedItems() );
};

Just an Idea, and sorry if you are trying to archieve something completely different or I misunderstud the main intention.
HTH
Carlos
November 12,

This topic is archived.

See also:


Back to support forum