radChat bubble customzation

1 Answer 4 Views
Conversational UI, Chat
Carl
Top achievements
Rank 1
Iron
Iron
Iron
Carl asked on 30 May 2025, 06:32 PM

On the chat UI below there are 2 white bubbles with the time of day over them. I'd like to add some text to this time of day so instead of saying  "8:32 PM" it says, for example,  "8:32 PM Contract # 5"

Is that possible and if so, how do I accomplish this?

Using version 2024.2.514

Thanks

Carl

1 Answer, 1 is accepted

Sort by
0
Nadya | Tech Support Engineer
Telerik team
answered on 04 Jun 2025, 11:34 AM

Hello, Carl,

Thank you for your interest in RadChat.

Yes, it is possible to customize the time separator text in the RadChat control to include additional text, such as "Contract # 5" in the ChatMessageNameElement. You can achieve this by handling the ItemFormatting event and set the TextMessageItemElement.NameLabelElement.Text to the desired text:

private void RadChat1_ItemFormatting(object sender, ChatItemElementEventArgs e)
{
    TextMessageItemElement textElement = e.ItemElement as TextMessageItemElement;
    if (textElement != null)
    {
        textElement.NameLabelElement.Text = textElement.NameLabelElement.Text + " Contract # 5";
    }
}

Here is the achieved result:

 

Additional information about customizing RadChat is available here: Accessing and Customizing Elements

I hope this helps. If you have any other questions, do not hesitate to contact me.

    Regards,
    Nadya | Tech Support Engineer
    Progress Telerik

    Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

    Tags
    Conversational UI, Chat
    Asked by
    Carl
    Top achievements
    Rank 1
    Iron
    Iron
    Iron
    Answers by
    Nadya | Tech Support Engineer
    Telerik team
    Share this question
    or