I have a RadGrid that uses a GridTemplate column along with two Gridbutton columns called Edit and Delete .When I click on Edit to edit a particular record, all my textboxes and combo boxes get filled from the grid column as these fields are also visible as the grid columns.In Edit panel ,we have also one treeview with checkboxes, which should populate with some checkboxes as checked depending on the dataset. Here our problem started.We are not able to set checkboxes as checked.While dubugging, I observed that it is making the nodes as checked depending on dataset data but still it is not showing in the page.
protected
void radTreeview_Load(object sender, EventArgs e)
{
RadTreeView radSelectPartner;
try
{
radSelectPartner = (RadTreeView)sender;
if (radSelectPartnerNodes.Count == 0)
{
DataSet dtatable = (DataSet)Session["SelectPartner"];
radSelectPartner.DataTextField = "Partner Name";
radSelectPartner.DataValueField = "OrdID";
radSelectPartner.DataFieldID = "OrdID";
radSelectPartner.DataFieldParentID = "ParentID";
radSelectPartner.DataSource = dtatable;
if (ViewState["ContactEmail"] != null)
{
DataSet dsSelectParners = chkitems(ContactEmail);
for (int count = 0; count < dsSelectParners.Tables[0].Rows.Count; count++)
{
if (dsSelectParners.Tables[0].Rows[count][0].ToString() != null)
{
foreach (RadTreeNode radNode in radSelectPartner.GetAllNodes())
{
radNode.Checkable = true;
// for checking only child node.Currently RadTreeView depth is 2.
if (radNode.Level != 0 && radNode.Level != 1)
{
if (radNode.Value.ToString() == dsSelectParners.Tables[0].Rows[count][1].ToString())
{
radNode.Checked = true;
}
}
}
}
}