Hi Guys, with the datagrid of Infragistics, if I want to format the layout of a specific column, like adding an image, I use the PerformLayout event of the grid after it is populated.
This is what I am doing with the treeview.
What I need to do now is to check the value of a specific column and change the cell content with an image.
What method should I use and how I can do it?
I would really appreciate if you have docs or tutorials about it, I am looking in my PC but nothing related to that. I have 2008 V3 controls.
Thank you
raffaeu said:What I need to do now is to check the value of a specific column and change the cell content with an image.
Generally speaking, to display images, you need to add an unbound column (handle ColumnSetGenerated and add a member to the e.ColumnSet.Columns collection) and make its data type typeof(Image), then assign the data using the UltraTreeNode.SetCellValue method.
Ok, so first of all I start handling this method and creating the column.This works great, as I can see the column. Unfortunately the column is the last one and it has to be first one for me.
void grdLogs_ColumnSetGenerated(object sender, ColumnSetGeneratedEventArgs e) { if (e.ColumnSet.Key == "Logs") { var column = new UltraTreeNodeColumn(); column.Key = "StatusImage"; column.DataType = typeof(Image); e.ColumnSet.Columns.Add(column); } }
So there are still two questions. How I can 'move' this column as the first one as I can't see a InsertAt method. Then how I can use the method SetCellValue, because I databind the treeview on 'fly' using a complex tree object graph.
thank you