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

Displaying Cell text with a gmail like lablel

4 Answers 95 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 11 Jan 2009, 12:14 AM
I need help. I am looking for the best way to display in cell textbox a text with a GMail like labels. 

Thanks for your help.

4 Answers, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 13 Jan 2009, 05:09 PM
Hello Patrick,

Thanks for writing.
Could you please send a screenshot of how the GMail-like label looks like ? I'm having troubles finding it.
Can you please also elaborate a bit more on the requested functionality.

Kind regards,
Victor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Patrick
Top achievements
Rank 1
answered on 13 Jan 2009, 06:05 PM
Hello Victor,

Sorry, I cannot find how to attach a screenshot to my reply. I open the following support ticket to attach a screenshot:  184540

You will notice (in the screeshot) the colored (filled) filled rounded rectangle, with a text, appearing as prefix in of the email subject, in the subject column. This is what I am talking about. If it's not clear enough. I will elaborate more, just let me.

Thanks a lot for your help,

Patrick.

0
Nikolay
Telerik team
answered on 19 Jan 2009, 01:34 PM
Hi Patrick,

The screenshot sent in the support ticket helped me understand your goals. Your scenario is possible with RadGridView, since our controls provide you with the ability to apply a wide range of customizations.

In your case you should create you own custom type of cell inherited from the base cell type GridDataCellElement. The creation of the cell should take place in the CreateCell event handler. For each of the labels we are using a special type of element - LightVisualElement. These elements are arranged in a custom layout by overriding ArrangeOverride method. In the SetContentCore we are assigning the Text property of the last LightVisualElement responsible for displaying the data. Finally, we set the Visibility property of the GMail-like labels according to a custom condition in the CellFormatting event handler (in our case this condition is the index of the data rows).

If you need additional assistance, feel free to contact me.

Kind regards,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Patrick
Top achievements
Rank 1
answered on 20 Jan 2009, 04:56 AM
Thanks a lot!!
Tags
GridView
Asked by
Patrick
Top achievements
Rank 1
Answers by
Victor
Telerik team
Patrick
Top achievements
Rank 1
Nikolay
Telerik team
Share this question
or