View Single Post
  #5 (permalink)  
Old November 15th, 2006, 12:33 PM
GlenM GlenM is offline
Registered User
 
Join Date: Nov 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I was facing a similar problem. I coded the DataBound event on the Details view. I still had to access the specific Row/Cell/Control I needed.

protected void DetailsView1_DataBound(object sender, EventArgs e) {
    if (DetailsView1.CurrentMode == DetailsViewMode.Insert) {
        CheckBox cbx = (CheckBox)DetailsView1.Rows[3].Cells[1].Controls[0];
        cbx.Checked = true;
    }
}

If there are other controls you need defaulted, just obtain a reference and set.

Hope this works for you!

Glen

Reply With Quote