0

Using c#.net4.5 telerik, Visual Studio 2012. Winforms.

Simple question, how do I add a new column in a code that can store images in a radgridview?

My old winforms code with datagridview used to be this.

DataGridViewImageCell p2 = new DataGridViewImageCell();
dgv_Pareto.Columns.Add(new DataGridViewImageColumn() { CellTemplate = p2, FillWeight = 1, HeaderText = "p2", Name = "p2", Width = 30 });

Why is this not the case in telerik?

1 Answer 1

1

You just need to use GridViewImageColumn. More info here.

Sign up to request clarification or add additional context in comments.

3 Comments

ah i wasnt looking for the obvious! well got it working thanks for the help, unfortunatly its not liking my image, i cann just add the image to the grid.cell[index].value iterating through the rows? or is this not the method to do it?
You should be able to use a Bitmap or an Image type. What is the type you are using? You can set an image cell value as follows: radGridView1.Rows[index].Cells["ColumnName"].Value = yourImage;
nah i sorted it, was correct only i forgot to populate the image i only created. lol. cheers for that

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.