Using the Object Data Source design takes a little getting used to if you havn't worked with it. Basically you have a number of "events" when you read, insert, update, and delete from data control.
For example in my latest tutorial at:
http://dnnsilverlight.adefwebserver.com/Samples/SilverlightAlbum/tabid/58/Default.aspx
I have this code when I am displaying a picture in the GridView. I am overriding the RowCreated eent on the GridView:
protected void gvPictures_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
PicturesInfo objPicturesInfo = (PicturesInfo)e.Row.DataItem;
if (objPicturesInfo != null)
{
Image objImage = (Image)e.Row.FindControl("image1");
string path = MapPath(@"~\DesktopModules\SilverlightAlbum\" + objPicturesInfo.Picture);
System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(path);
float scale = 150.0f / System.Math.Max(bmp.Height, bmp.Width);
System.Drawing.Image thumb = bmp.GetThumbnailImage(
(int)(bmp.Width * scale), (int)(bmp.Height * scale),
null, System.IntPtr.Zero);
Unit objHeightUnit = new Unit(thumb.Height);
Unit objWidthUnit = new Unit(thumb.Width);
objImage.Height = objHeightUnit;
objImage.Width = objWidthUnit;
bmp.Dispose();
thumb.Dispose();
}
}
}
using simular code you can detect the value in the database and set checkbox properly.
You may also need to override the inserting and updating events to read the checkbox value.