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

TableItem / DetailsItem

5 Answers 48 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Christian
Top achievements
Rank 1
Christian asked on 13 Oct 2009, 09:42 AM
Hello Telerik-Support team

I create a report with a table control and some conrols in the details section.

Currently I want to implement that each table item and each details section item
get a defined color. This color is defined in the database,

So the table shows for example 5 items from an table which also has the RGB-Color
definition. So on showing this items in the report each table row(item) must get this
color as background.

The same i want to implement on the details section (items).

Is this posible and when how? :)

Greetings
Christian

5 Answers, 1 is accepted

Sort by
0
Accepted
Steve
Telerik team
answered on 14 Oct 2009, 08:43 AM
Hi Christian,

Consider the following code:

private void detail_ItemDataBound(object sender, EventArgs e)
       {
           Telerik.Reporting.Processing.DetailSection procDetail = (Telerik.Reporting.Processing.DetailSection)sender;
           Telerik.Reporting.Processing.TextBox txt = (Telerik.Reporting.Processing.TextBox)procDetail.ChildElements.Find("myHexColorDataTextBox", true)[0];
           string hexValue = txt.Text;
           System.Drawing.Color myColor = System.Drawing.ColorTranslator.FromHtml(hexValue);
           txt.Style.BackgroundColor = myColor;
       }

where myHexColorDataTextBox is a textbox in the detail section bound to your column with HEX values. If you store your values in RGB, then use System.Drawing.Color.FromArgb() instead. Traversing all textbox items in a table would be a bit more of a pain, but it should work.


Sincerely yours,
Steve
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
Christian
Top achievements
Rank 1
answered on 14 Oct 2009, 07:58 PM
Hi Steve,

thanks for teh fast reply and this really great idea and solution. Thanks alot for this.:)

I have an other question about CSS and the skins. I greate a new thread for this. It
was really nice if you have time to take a look on it.

Skin Problem

Thanks alot again.

Greeting
Christian
0
Steve
Telerik team
answered on 15 Oct 2009, 09:26 AM
Hi Uwe,

I'm glad my suggestion helped. However I am not able to open the link in your last post for some reason. Would you provide us with a valid URL so we can review your next question?

Regards,
Steve
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
Christian
Top achievements
Rank 1
answered on 15 Oct 2009, 09:49 AM
Hi Steve,

Unfortunaly I can't it open, too. :(

Here is the link to the Demo-Website I create for this skin CSS problem:
CSS Skin Problem (Web)

You can only see the problem if you start the website in a Browser.

There is a scope/boarder/scape arround the RadMenu rootitem. This occurs
after I update my user skin from Q2 2008 to Q2 2009. I'll take the Office 2007
Skin from telerik an modierd it in the same way I done it with the skin from Q2 2008,

Hopefully you can remove the boarder arroung the RadMenu rootitem :)

Thanks again
Christian
0
Steve
Telerik team
answered on 15 Oct 2009, 11:43 AM
Hello Uwe,

The problem you talk about is about our ASP.NET web controls and is not relevant to the Telerik Reporting product. We kindly ask you to open a forum/support thread for the exact product (in this case RadMenu control) you have problems with and we would assist you accordingly.

Kind regards,
Steve
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.
Tags
General Discussions
Asked by
Christian
Top achievements
Rank 1
Answers by
Steve
Telerik team
Christian
Top achievements
Rank 1
Share this question
or