I am curious about what some of the properties are of the Datagrid. Most of what I read on the datagrid properties is a lot of double talk.
DataGrid1.Items[x]-->repre
DataGrid1.Items.cells[x]--
DataGrid1.Items.cells[x].C
I get an error on ->Image img
c:\inetpub\wwwroot\Surplus
Thanks Tim
Main Topics
Browse All Topics





by: HeadspacePosted on 2006-08-14 at 09:00:04ID: 17311175
I must not have covered this well enough in the last question; here's a commented version of the last example. Let me know where i need to provide more information.
sender, EventArgs e) //allows manipulation of the datagrid prior to render, but after databinding n //allows manipulation of the datagrid row or its contents
private void DataGrid1_PreRender(object
{
foreach (DataGridItem itm in DataGrid1.Items) //you don't have to iterate here; instead you could select a specific row in the grid.
{
Image img = (Image)itm.Cells[cell number that holds the image control].Controls[1]; //gets the control in the specified cell
if (img.ImageUrl == null)//allows manipulation of the control or its contents
{
itm.Cells[cell number that holds the image control].Controls.Clear();
}
}
}
wil