コード例 #1
0
 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;
 }
コード例 #2
0
 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();
         }
     }
 }
コード例 #3
0
ファイル: uApplication.ascx.cs プロジェクト: ewin66/dev
        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;
            }
        }
コード例 #4
0
    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;
            }
        }
    }
コード例 #5
0
ファイル: ucBalanceInit.ascx.cs プロジェクト: ewin66/dev
        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);
                }
            }
        }