This is a migrated thread and some comments may be shown as answers.

Hide panel by number of rows

3 Answers 135 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ben Casse
Top achievements
Rank 1
Ben Casse asked on 28 Apr 2011, 03:19 AM
There is a Table which is hosted in a panel. I want to hide the panel when the table is empty. I can add a parameter to pass the number of rows at runtime and add rule to hide the panel. Just wondering is there a better way to do it.

Best Regards

3 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 28 Apr 2011, 07:45 AM
Hi Ben Casse,

You can hide the Table item directly. The easiest way is to set a Binding for a table "header" Textbox.

 Property Path Expression 
 Parent.Visible  =IIF(Count(1)>0, True, False)

Check out the attached sample report that illustrates the suggested approach.

Regards,
Steve
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ben Casse
Top achievements
Rank 1
answered on 28 Apr 2011, 10:14 PM
Thanks for your reply. One more question. Is there anyway we can get the number of table rows? We have a table which shows the device data daily. On the top of the table we got a textbox and shows the number of days whcih the talbe contents.

Regards,
0
Steve
Telerik team
answered on 04 May 2011, 09:06 AM
Hi Ben Casse,

You can use the built-in RowNumber() function in a Table Detail Group in order to count the rows.

Best wishes,
Steve
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Ben Casse
Top achievements
Rank 1
Answers by
Steve
Telerik team
Ben Casse
Top achievements
Rank 1
Share this question
or