Hiding rows in a tablepane

75 views
Skip to first unread message

Jesse Porch

unread,
Mar 12, 2012, 5:27:50 PM3/12/12
to intersys...@googlegroups.com

Hi,

I’m working on a project where I have a dashboard page which displays multiple tablepanes that are populated with results obtained by individual queries (the system itself is an Ensemble instance, if that matters). Because of the way I request data, the resultsets that are processed by Ensemble come back with some rows that have basic information (the name of one of the systems that the dashboard is targeting) but that isn’t needed for users, so I want to hide rows that have null values on one of the important columns. Does tablepane support an easy way to conditionally hide rows based on a hard-coded condition?

 

Thanks,

Jesse Porch

Derek Day

unread,
Mar 12, 2012, 5:39:00 PM3/12/12
to intersys...@googlegroups.com
I thought there was a callback that would let you set the style for the row.. I don't see it; so unless someone else has a solution, you may need to find an Ensemble solution.
~Derek

--
You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
To post to this group, send email to InterSys...@googlegroups.com
To unsubscribe from this group, send email to InterSystems-Z...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/InterSystems-ZEN?hl=en
Zen Community Terms and Conditions: http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions

Roberto

unread,
Mar 12, 2012, 6:20:27 PM3/12/12
to intersys...@googlegroups.com
If you want to just hide a row, you can use the <condition> element, with a css:

<condition colName="Amount"
predicate="EQ"
value="0" rowStyle="display:none;"/>

-Roberto

Derek Day

unread,
Mar 12, 2012, 7:34:55 PM3/12/12
to intersys...@googlegroups.com
That's what I was trying to remember! Thanks, Roberto. 

Jesse I think this should work -- the condition element is just a child element of the tablePane.
~Derek

--

Benjamin Spead

unread,
Mar 12, 2012, 7:37:32 PM3/12/12
to intersys...@googlegroups.com

What will happen if the column mentioned is not present in the table?

Derek Day

unread,
Mar 12, 2012, 7:50:35 PM3/12/12
to intersys...@googlegroups.com
Right, we probably want to add the condition, the same way we are currently adding columns....


On Monday, March 12, 2012, Benjamin Spead <Benjami...@intersystems.com> wrote:
> What will happen if the column mentioned is not present in the table?
>
>  
>
> From: intersys...@googlegroups.com [mailto:intersys...@googlegroups.com] On Behalf Of Derek Day
> Sent: Monday, March 12, 2012 7:35 PM
> To: intersys...@googlegroups.com
> Subject: Re: [InterSystems-Zen] Re: Hiding rows in a tablepane
>
>  
>
> That's what I was trying to remember! Thanks, Roberto. 
>
>  
>
> Jesse I think this should work -- the condition element is just a child element of the tablePane.
>
> ~Derek
>
> On Mon, Mar 12, 2012 at 6:20 PM, Roberto <rcah...@gmail.com> wrote:
>
> If you want to just hide a row, you can use the <condition> element, with a css:
>
>  
>
> <condition colName="Amount"
> predicate="EQ"
> value="0" rowStyle="display:none;"/>
>
>  
>
> -Roberto
>
> On Monday, March 12, 2012 5:27:50 PM UTC-4, Jesse Porch wrote:
>
> Hi,
>
> I’m working on a project where I have a dashboard page which displays multiple tablepanes that are populated with results obtained by individual queries (the system itself is an Ensemble instance, if that matters). Because of the way I request data, the resultsets that are processed by Ensemble come back with some rows that have basic information (the name of one of the systems that the dashboard is targeting) but that isn’t needed for users, so I want to hide rows that have null values on one of the important columns. Does tablepane support an easy way to conditionally hide rows based on a hard-coded condition?
>
>  
>
> Thanks,
>
> Jesse Porch
>
> --
> You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
> To post to this group, send email to InterSys...@googlegroups.com
> To unsubscribe from this group, send email to InterSystems-Z...@googlegroups.com
> For more options, visit this group at http://groups.google..com/group/InterSystems-ZEN?hl=en

> Zen Community Terms and Conditions: http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions
>
>  
>
> --
> You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
> To post to this group, send email to InterSys...@googlegroups.com
> To unsubscribe from this group, send email to InterSystems-Z...@googlegroups.com
> For more options, visit this group at http://groups.google..com/group/InterSystems-ZEN?hl=en

> Zen Community Terms and Conditions: http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions
>
> --
> You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
> To post to this group, send email to InterSys...@googlegroups.com
> To unsubscribe from this group, send email to InterSystems-Z...@googlegroups.com
> For more options, visit this group at http://groups.google..com/group/InterSystems-ZEN?hl=en

Jesse Porch

unread,
Mar 15, 2012, 7:31:35 PM3/15/12
to intersys...@googlegroups.com

Thanks for the input. I ended using the condition as Roberto suggested, and discovered that if the column it mentions doesn’t exist then nothing is hidden. This allowed me to extend our tablepane component to have a column that lets the user flag rows to be hidden (the column itself is already being hidden by logic in our class). Overall, things seem to be painless, so thanks again!

Jesse

For more options, visit this group at http://groups.google.com/group/InterSystems-ZEN?hl=en

Goody Jon (NHS LOTHIAN)

unread,
Mar 15, 2012, 7:38:10 PM3/15/12
to intersys...@googlegroups.com, intersys...@googlegroups.com
Jesse,

We did something similar to hide rows but unfortunately the navigator bar still displays the total number of records regardless. I also noticed that if you start paging through the records some pages have no data associated as all records on this page are hidden etc..

Only work around is not to have navigator bar from what I can see.

Jon Goody
Sent from my iPhone

On 15 Mar 2012, at 23:31, "Jesse Porch" <Jesse...@intersystems.com> wrote:

Thanks for the input. I ended using the condition as Roberto suggested, and discovered that if the column it mentions doesn’t exist then nothing is hidden. This allowed me to extend our tablepane component to have a column that lets the user flag rows to be hidden (the column itself is already being hidden by logic in our class). Overall, things seem to be painless, so thanks again!

Jesse

 

For more options, visit this group at http://groups.google.com/group/InterSystems-ZEN?hl=en

--
You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
To post to this group, send email to InterSys...@googlegroups.com
To unsubscribe from this group, send email to InterSystems-Z...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/InterSystems-ZEN?hl=en

********************************************************************************************************************

This message may contain confidential information. If you are not the intended recipient please inform the
sender that you have received the message in error before deleting it.
Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents:
to do so is strictly prohibited and may be unlawful.

Thank you for your co-operation.

NHSmail is the secure email and directory service available for all NHS staff in England and Scotland
NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and GSi recipients
NHSmail provides an email address for your career in the NHS and can be accessed anywhere
For more information and to find out how you can switch, visit www.connectingforhealth.nhs.uk/nhsmail

********************************************************************************************************************

Roberto

unread,
Mar 15, 2012, 7:51:24 PM3/15/12
to intersys...@googlegroups.com
You can hide those too Jon if you want:

#navBar .tnbrFound {
   display:none;
}

<tableNavigatorBar id="navBar" showPageSize="true" tablePaneId="table" />

-Roberto


On Thursday, March 15, 2012 7:38:10 PM UTC-4, Jon Goody wrote:
Jesse,

We did something similar to hide rows but unfortunately the navigator bar still displays the total number of records regardless. I also noticed that if you start paging through the records some pages have no data associated as all records on this page are hidden etc..

Only work around is not to have navigator bar from what I can see.

Jon Goody
Sent from my iPhone

On 15 Mar 2012, at 23:31, "Jesse Porch" <Jesse...@intersystems.com> wrote:

Thanks for the input. I ended using the condition as Roberto suggested, and discovered that if the column it mentions doesn’t exist then nothing is hidden. This allowed me to extend our tablepane component to have a column that lets the user flag rows to be hidden (the column itself is already being hidden by logic in our class). Overall, things seem to be painless, so thanks again!

Jesse

 

From: intersystems-zen@googlegroups.com [mailto:intersystems-zen@googlegroups.com] On Behalf Of Derek Day
Sent: Monday, March 12, 2012 7:51 PM
To: intersystems-zen@googlegroups.com
Subject: Re: [InterSystems-Zen] Hiding rows in a tablepane

 

Right, we probably want to add the condition, the same way we are currently adding columns....

On Monday, March 12, 2012, Benjamin Spead <Benjamin.Spead@intersystems.com> wrote:
> What will happen if the column mentioned is not present in the table?
>
>  
>
> From: intersystems-zen@googlegroups.com [mailto:intersystems-zen@googlegroups.com] On Behalf Of Derek Day
> Sent: Monday, March 12, 2012 7:35 PM
> To: intersystems-zen@googlegroups.com
> Subject: Re: [InterSystems-Zen] Re: Hiding rows in a tablepane
>
>  
>
> That's what I was trying to remember! Thanks, Roberto. 
>
>  
>
> Jesse I think this should work -- the condition element is just a child element of the tablePane.
>
> ~Derek
>
> On Mon, Mar 12, 2012 at 6:20 PM, Roberto <rcah...@gmail.com> wrote:
>
> If you want to just hide a row, you can use the <condition> element, with a css:
>
>  
>
> <condition colName="Amount"
> predicate="EQ"
> value="0" rowStyle="display:none;"/>
>
>  
>
> -Roberto
>
> On Monday, March 12, 2012 5:27:50 PM UTC-4, Jesse Porch wrote:
>
> Hi,
>
> I’m working on a project where I have a dashboard page which displays multiple tablepanes that are populated with results obtained by individual queries (the system itself is an Ensemble instance, if that matters). Because of the way I request data, the resultsets that are processed by Ensemble come back with some rows that have basic information (the name of one of the systems that the dashboard is targeting) but that isn’t needed for users, so I want to hide rows that have null values on one of the important columns. Does tablepane support an easy way to conditionally hide rows based on a hard-coded condition?
>
>  
>
> Thanks,
>
> Jesse Porch
>
> --
> You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.

> To post to this group, send email to InterSystems-ZEN@googlegroups.com
> To unsubscribe from this group, send email to InterSystems-ZEN-unsubscribe@googlegroups.com


> For more options, visit this group at http://groups.google..com/group/InterSystems-ZEN?hl=en
> Zen Community Terms and Conditions: http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions
>
>  
>
> --
> You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.

> To post to this group, send email to InterSystems-ZEN@googlegroups.com
> To unsubscribe from this group, send email to InterSystems-ZEN-unsubscribe@googlegroups.com


> For more options, visit this group at http://groups.google..com/group/InterSystems-ZEN?hl=en
> Zen Community Terms and Conditions: http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions
>
> --
> You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.

> To post to this group, send email to InterSystems-ZEN@googlegroups.com
> To unsubscribe from this group, send email to InterSystems-ZEN-unsubscribe@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.

To post to this group, send email to InterSystems-ZEN@googlegroups.com
To unsubscribe from this group, send email to InterSystems-ZEN-unsubscribe@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
To post to this group, send email to InterSystems-ZEN@googlegroups.com
To unsubscribe from this group, send email to InterSystems-ZEN-unsubscribe@googlegroups.com

Goody Jon (NHS LOTHIAN)

unread,
Mar 15, 2012, 7:56:34 PM3/15/12
to intersys...@googlegroups.com, intersys...@googlegroups.com
Sorry not sure what you mean by hiding those too. The blanks pages or total number of records?

Could u give example any chance.


Jon Goody

Sent from my iPhone

On 15 Mar 2012, at 23:51, "Roberto" <rcah...@gmail.com> wrote:

You can hide those too Jon if you want:

#navBar .tnbrFound {
   display:none;
}

<tableNavigatorBar id="navBar" showPageSize="true" tablePaneId="table" />

-Roberto


On Thursday, March 15, 2012 7:38:10 PM UTC-4, Jon Goody wrote:
Jesse,

We did something similar to hide rows but unfortunately the navigator bar still displays the total number of records regardless. I also noticed that if you start paging through the records some pages have no data associated as all records on this page are hidden etc..

Only work around is not to have navigator bar from what I can see.

Jon Goody
Sent from my iPhone

On 15 Mar 2012, at 23:31, "Jesse Porch" <Jesse...@intersystems.com> wrote:

Thanks for the input. I ended using the condition as Roberto suggested, and discovered that if the column it mentions doesn’t exist then nothing is hidden. This allowed me to extend our tablepane component to have a column that lets the user flag rows to be hidden (the column itself is already being hidden by logic in our class). Overall, things seem to be painless, so thanks again!

Jesse

 

From: intersystems-zen@googlegroups.com [mailto:intersystems-zen@googlegroups.com] On Behalf Of Derek Day
Sent: Monday, March 12, 2012 7:51 PM
To: intersystems-zen@googlegroups.com
Subject: Re: [InterSystems-Zen] Hiding rows in a tablepane

 

Right, we probably want to add the condition, the same way we are currently adding columns....

On Monday, March 12, 2012, Benjamin Spead <Benjamin.Spead@intersystems.com> wrote:
> What will happen if the column mentioned is not present in the table?
>
>  
>
> From: intersystems-zen@googlegroups.com [mailto:intersystems-zen@googlegroups.com] On Behalf Of Derek Day
> Sent: Monday, March 12, 2012 7:35 PM
> To: intersystems-zen@googlegroups.com
> Subject: Re: [InterSystems-Zen] Re: Hiding rows in a tablepane
>
>  
>
> That's what I was trying to remember! Thanks, Roberto. 
>
>  
>
> Jesse I think this should work -- the condition element is just a child element of the tablePane.
>
> ~Derek
>
> On Mon, Mar 12, 2012 at 6:20 PM, Roberto <rcah...@gmail.com> wrote:
>
> If you want to just hide a row, you can use the <condition> element, with a css:
>
>  
>
> <condition colName="Amount"
> predicate="EQ"
> value="0" rowStyle="display:none;"/>
>
>  
>
> -Roberto
>
> On Monday, March 12, 2012 5:27:50 PM UTC-4, Jesse Porch wrote:
>
> Hi,
>
> I’m working on a project where I have a dashboard page which displays multiple tablepanes that are populated with results obtained by individual queries (the system itself is an Ensemble instance, if that matters). Because of the way I request data, the resultsets that are processed by Ensemble come back with some rows that have basic information (the name of one of the systems that the dashboard is targeting) but that isn’t needed for users, so I want to hide rows that have null values on one of the important columns. Does tablepane support an easy way to conditionally hide rows based on a hard-coded condition?
>
>  
>
> Thanks,
>
> Jesse Porch
>
> --
> You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.

> To post to this group, send email to InterSystems-ZEN@googlegroups.com
> To unsubscribe from this group, send email to InterSystems-ZEN-unsubscribe@googlegroups.com


> For more options, visit this group at http://groups.google..com/group/InterSystems-ZEN?hl=en
> Zen Community Terms and Conditions: http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions
>
>  
>
> --
> You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.

> To post to this group, send email to InterSystems-ZEN@googlegroups.com
> To unsubscribe from this group, send email to InterSystems-ZEN-unsubscribe@googlegroups.com


> For more options, visit this group at http://groups.google..com/group/InterSystems-ZEN?hl=en
> Zen Community Terms and Conditions: http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions
>
> --
> You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.

> To post to this group, send email to InterSystems-ZEN@googlegroups.com
> To unsubscribe from this group, send email to InterSystems-ZEN-unsubscribe@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.

To post to this group, send email to InterSystems-ZEN@googlegroups.com
To unsubscribe from this group, send email to InterSystems-ZEN-unsubscribe@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
To post to this group, send email to InterSystems-ZEN@googlegroups.com
To unsubscribe from this group, send email to InterSystems-ZEN-unsubscribe@googlegroups.com

Roberto

unread,
Mar 15, 2012, 11:24:24 PM3/15/12
to intersys...@googlegroups.com
Hi Jon,

I meant you can hide the total records if you wanted to by using CSS.

I gave this example in my last post where you put in the XData Style:

#navBar .tnbrFound {
   display:none;
}

Where #navBar represents the id of your navigator bar. The .tnbrFound is the class of the <div> that is containing that string. If you set the css to display:none then it will not be displayed in the browser.

But yes to your other point, the problem is that if your pageSize = 20, you might have some missing records in that tablePane. It's there in the browser but it is not being displayed.

Jesse - why couldn't you just use an SQL statement to not display the items?

-Roberto

Derek Day

unread,
Mar 15, 2012, 11:39:10 PM3/15/12
to intersys...@googlegroups.com
Roberto -- the ResultSet is coming back from an Ensemble Business operation and the null records are used by various business processes along the way. We are leaving these records hidden on the page so that the users do not have to see them, but so that we can take a look at them if we want to see the information they contain for troubleshooting purposes (before going back to look at the message traces in Ensemble).

I probably won't have time for a while, but if anyone happens to come up with a nice client-side or jQuery based component that displays tabular data, I would probably use that instead of the tablePane -- it would be a nice to have a little more control over how the data is rendered and updated (we immediately display a cached value and then update the data when it arrives, and the tablePanes go all Battlestar Galactica on us while loading the new data).

~Derek

To post to this group, send email to InterSys...@googlegroups.com
To unsubscribe from this group, send email to InterSystems-Z...@googlegroups.com

Roberto

unread,
Mar 16, 2012, 12:21:43 AM3/16/12
to intersys...@googlegroups.com
Oh OK.

For a tablePane replacement, I've been testing jqGrid ( http://www.trirand.com/blog/ ) and also DataTables ( http://datatables.net/index ). They are both jQuery plugins. I basically found them through Google.

I've tried them both with Zen and they work find with initial testing.

They both look good and pretty simple to use and it seems that they have a good online community.

I'm leaning more towards this DataTables because they have more examples on their website and better documentation. They also support ThemeRoller from jQuery UI.

Maybe someone else out there has any recommendations?

-Roberto

Derek Day

unread,
Mar 16, 2012, 6:44:04 AM3/16/12
to intersys...@googlegroups.com
Did you create a custom component for DataTables that you would be able to share?
> --
> You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
> To post to this group, send email to InterSys...@googlegroups.com
> To unsubscribe from this group, send email to InterSystems-Z...@googlegroups.com

Roberto

unread,
Mar 16, 2012, 4:18:06 PM3/16/12
to intersys...@googlegroups.com
No I did not create a custom component for this.

I just did some ad-hoc testing using straight html from the examples that they gave.

-Roberto
> To post to this group, send email to InterSystems-ZEN@googlegroups.com
> To unsubscribe from this group, send email to InterSystems-ZEN-unsubscribe@googlegroups.com
Reply all
Reply to author
Forward
0 new messages