I´m writing on a webpart for sharepoint, so I have to generate a Datagrid problematically.
The Situation is that I get a Dataview, generate the Gris and bind the Data.
One column should show a Image, so I have to generate a template column with item template.
So code looks like this:
//Instantiate the DataGrid, and set the DataSource _grdResults = new DataGrid(); _grdResults.AutoGenerateColumns = false; _grdResults.DataSource = view; TemplateColumn colPic = new TemplateColumn(); colPic.HeaderText = "Image";
I found dozens of example for asp to create the item-template, but how construct one in code and bind it´s ImageUrl to "imgURL" of the Dataview?
thanks for any advice