protected void ASPxTreeList1_HtmlRowPrepared(object sender, DevExpress.Web.ASPxTreeList.TreeListHtmlRowEventArgs e) { //ASPxTextBox level = ASPxTreeList1.FindEditFormTemplateControl("txtSEQLevel") as ASPxTextBox; //level.Enabled = false; //level.ForeColor = System.Drawing.Color.Gray; //level.BackColor = System.Drawing.Color.LightGray; }
protected void ASPxTreeList1_HtmlRowPrepared(object sender, DevExpress.Web.ASPxTreeList.TreeListHtmlRowEventArgs e) { using (IDocumentSession session = Global.Store.OpenSession()) { using (var transaction = new TransactionScope()) { if (e.RowKind != TreeListRowKind.Preview && session.Query <TreeListMember>().Where(x => x.AppID == e.NodeKey).Any()) { TreeMember member = session.Load <TreeMember>(session.Query <TreeMember>().Where(x => x.AppID == e.NodeKey).First().Id); member.RowClientId = e.Row.ClientID; session.SaveChanges(); } transaction.Complete(); } } }
protected void grdSitemap_HtmlRowPrepared(object sender, DevExpress.Web.ASPxTreeList.TreeListHtmlRowEventArgs e) { ASPxTreeList treeList = (ASPxTreeList)sender; ASPxCheckBox selectionCheckbox = null; foreach (TableCell cell in e.Row.Cells) { TreeListSelectionCell selectionCell = cell as TreeListSelectionCell; if (selectionCell != null) { selectionCheckbox = (ASPxCheckBox)selectionCell.Controls[0]; break; } } if (selectionCheckbox != null) { TreeListNode node = treeList.FindNodeByKeyValue(e.NodeKey); selectionCheckbox.Checked = true; } }
protected void ASPxTreeListDemo_HtmlRowPrepared(object sender, DevExpress.Web.ASPxTreeList.TreeListHtmlRowEventArgs e) { ASPxTreeList treeList = (ASPxTreeList)sender; WebControl selectionCheckbox = null; foreach (TableCell cell in e.Row.Cells) { TreeListSelectionCell selectionCell = cell as TreeListSelectionCell; if (selectionCell != null) { selectionCheckbox = (WebControl)selectionCell.Controls[0]; break; } } if (selectionCheckbox != null) { TreeListNode node = treeList.FindNodeByKeyValue(e.NodeKey); if (node.HasChildren) { selectionCheckbox.Enabled = false; } } }
protected void tgrdAccountBalance_HtmlRowPrepared(object sender, DevExpress.Web.ASPxTreeList.TreeListHtmlRowEventArgs e) { ASPxTreeList treelist = sender as ASPxTreeList; int visibleIndex = treelist.GetVisibleNodes().IndexOf(treelist.FindNodeByKeyValue(e.NodeKey)); if (e.Level == 1) { e.Row.Font.Bold = true; } Account _account = session.GetObjectByKey <Account>(e.GetValue("AccountId")); if (_account != null) { if (_account.AccountTypeId.AccountCategoryId.AccountCategoryId == Guid.Parse("C1EC8F33-C4F6-4312-AE4A-6F8FD3A1F5DB")) { e.Row.BackColor = Color.FromArgb(211, 235, 183); } else { e.Row.BackColor = Color.FromArgb(0, 255, 255); } } }