Hello, Nico,
The
CellFormatting event is an appropriate solution for changing only the text part of a cell and keeping its value unchanged. I have prepared a sample code snippet for your reference which result is illustrated in the attached screenshot. It seems that the appended text in the
CellFormatting event is displayed as expected:
public RadForm1()
{
InitializeComponent();
DataTable dt = new DataTable();
dt.Columns.Add("Id", typeof(int));
dt.Columns.Add("Name", typeof(string));
dt.Columns.Add("Description", typeof(string));
for (int i = 0; i < 10; i++)
{
dt.Rows.Add(i, "Data" + i, "Description" + i);
}
this.radGridView1.CellFormatting += radGridView1_CellFormatting;
this.radGridView1.DataSource = dt;
this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
}
private void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e)
{
if (e.Column.Name == "Description")
{
e.CellElement.Text = e.CellElement.Value + " END";
e.CellElement.Image = Properties.Resources.OutlookViewCalendar;
e.CellElement.DrawImage = true;
e.CellElement.TextImageRelation = TextImageRelation.TextBeforeImage;
}
else
{
e.CellElement.ResetValue(LightVisualElement.ImageProperty, ValueResetFlags.Local);
e.CellElement.ResetValue(LightVisualElement.DrawImageProperty, ValueResetFlags.Local);
e.CellElement.ResetValue(LightVisualElement.TextImageRelationProperty, ValueResetFlags.Local);
}
}

Am I missing something? Could you please specify the exact steps how to reproduce the problem? What changes do I need to perform on my end?
Once we replicate the issue locally, we would be able to make an adequate analysis of the precise case and think about a suitable solution. Thank you in advance.
I am looking forward to your reply.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.