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

How to customize table properties

5 Answers 159 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Samson Selvakumar
Top achievements
Rank 1
Samson Selvakumar asked on 25 Sep 2009, 11:23 AM
Hi,
  I am new to telerik reporting. I want to generate a grid type layout report like that of a table. And i'm setting the data source programmatically using sql queries at run time. Also i need to hide the columns dynamically at run time and to avoid duplicate rows i'm using groups(Parent and Child groups) I used table control which is meeting almost all my requirements except the hiding property ie., visibility. If  I set the data source for the table at design time the visibility property is functioning well. But when I set the data source at run time, even after  setting the visibility property of the columns(ie., text fields) as false its only shrinking in size and not disappearing in my report. Is there any solution for this issue?
Kindly help me with a solution ASAP.
Thanks.....

5 Answers, 1 is accepted

Sort by
0
Massimiliano Bassili
Top achievements
Rank 1
answered on 25 Sep 2009, 12:13 PM
Do not think that this is a trivial task, I found similar question already answered by Telerik indicating just that: http://www.telerik.com/community/forums/reporting/telerik-reporting/hide-table-columns.aspx
0
Samson Selvakumar
Top achievements
Rank 1
answered on 25 Sep 2009, 01:20 PM
Hi Massimiliano Bassili
   Thanks for your time. My issue is I have four drop down list boxes say, dropdown1, dropdown2, dropdown3 and dropdown4. If i chose any item in dropdown1 1st column in my report should be hidden. if i chose any item in dropdown2 , 2nd column  of my report should be hidden and so on... if i choose all the four dropdowns all the column should be hidden. So on those conditions i'm setting the visibility property of the column(ie., text boxes) as false. But when the drop down list item is selected the corresponding column in the report which i want to hide is only shrinking in size and not disappearing. Please help me if there is any solution for this issue.
Pardon me if my english is bad.
Thanks...

0
Ivan
Telerik team
answered on 25 Sep 2009, 03:43 PM
Hello Samson Selvakumar,

Currently there is no way out of the box to hide table columns programmatically, as described in the thread Massimiliano pointed you to, however we might consider implementing this feature in the future. For now you have several options to work around this limitation of the Table/Crosstab report item yourself:
1. If the number of possible table layouts is limited you can create a separate table for each individual layout and then show the appropriate one according to the user input.
2. If the number of possible table layouts is relatively large you can try to remove the columns that should not appear in your report programmatically. This is not so trivial, but you can use the code generated by the Report Designer inside the InitializeComponent method as a guideline. Create two tables: one with all available columns and one with all columns but one, then compare the differences in the generated code.
3. It is possible to create the entire table programmatically from the scratch, but this should involve more effort than the previous methods.

Regards,
Ivan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Pavan
Top achievements
Rank 1
answered on 22 Aug 2012, 10:37 AM
Did this requirement In the Latest version.If So please provide us a sample. Is this rectified in latest version other wise send the sample for  alternate ptocedure to hide the specific column in the table?
0
Steve
Telerik team
answered on 22 Aug 2012, 12:31 PM
Hi Pavan,

You would have to use one of the approaches suggested by my colleague. In the references thread that he posted in the last post, you can find sample project that shows how not to show a column.

Kind regards,
Steve
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

Tags
General Discussions
Asked by
Samson Selvakumar
Top achievements
Rank 1
Answers by
Massimiliano Bassili
Top achievements
Rank 1
Samson Selvakumar
Top achievements
Rank 1
Ivan
Telerik team
Pavan
Top achievements
Rank 1
Steve
Telerik team
Share this question
or