Beispiel #1
0
 protected void CustomerGridView_HtmlRowCreated(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewTableRowEventArgs e)
 {
     if (e.RowType == GridViewRowType.EditForm)
     {
         if (e.GetValue("ID") != null && e.GetValue("ID") != "")
         {
             ASPxWebControl.RedirectOnCallback("CustomerInfo.aspx?ID=" + e.GetValue("ID") + "&TabIndex=0");
         }
         else
         {
             ASPxWebControl.RedirectOnCallback("CustomerInfo.aspx");
         }
     }
 }
Beispiel #2
0
 protected void NotesGridView_HtmlRowCreated(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewTableRowEventArgs e)
 {
     if (e.RowType == GridViewRowType.EditForm)
     {
         if (e.GetValue("NotesID") != null && e.GetValue("NotesID") != "")
         {
             ASPxWebControl.RedirectOnCallback("NotesEdit.aspx?ID=" + e.GetValue("ID") + "&NotesID=" + e.GetValue("NotesID") + "&PrevPage=NotesSearch.aspx");
         }
         else
         {
             ASPxWebControl.RedirectOnCallback("NotesEdit.aspx?PrevPage=NotesSearch.aspx");
         }
     }
 }
Beispiel #3
0
 protected void VersionInfoGridView_HtmlRowCreated(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewTableRowEventArgs e)
 {
     if (e.RowType == GridViewRowType.EditForm)
     {
         if (e.GetValue("VersionInfoID") != null && e.GetValue("VersionInfoID") != "")
         {
             ASPxWebControl.RedirectOnCallback("VersionInfoEdit.aspx?ID=" + e.GetValue("ID") + "&VersionInfoID=" + e.GetValue("VersionInfoID") + "&PrevPage=CustomerInfo.aspx");
         }
         else
         {
             ASPxWebControl.RedirectOnCallback("VersionInfoEdit.aspx?ID=" + CustomerKey.ToString() + "&PrevPage=CustomerInfo.aspx");
         }
     }
 }
Beispiel #4
0
        protected void ASPxGridView1_HtmlRowPrepared(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewTableRowEventArgs e)
        {
            if (e.VisibleIndex < 0)
            {
                return;
            }
            string compFlag = e.GetValue("COMP_FLAG").ToString();

            switch (compFlag)
            {
            case "0":
                e.Row.BackColor = System.Drawing.Color.White;
                break;

            case "1":
                e.Row.BackColor = System.Drawing.Color.Red;
                break;

            case "2":
                e.Row.BackColor = System.Drawing.Color.Green;
                break;

            default:
                return;
            }
        }
Beispiel #5
0
        protected void grdNames_HtmlRowCreated(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewTableRowEventArgs e)
        {
            if (e.RowType == DevExpress.Web.ASPxGridView.GridViewRowType.Detail)
            {
                string    code = e.GetValue("Code").ToString();
                clsDetail det  = currentDetails.GetDetails(code);

                ASPxPageControl cntrl = ((ASPxGridView)sender).FindDetailRowTemplateControl(e.VisibleIndex, "ASPxPageControl1") as ASPxPageControl;

                ASPxLabel genLab = cntrl.FindControl("ASPxLabel1") as ASPxLabel;
                if (genLab != null)
                {
                    genLab.Text = det.Gender;
                }

                ASPxLabel courtLab = cntrl.FindControl("ASPxLabel2") as ASPxLabel;
                if (courtLab != null)
                {
                    courtLab.Text = det.TitleOfCourt;
                }

                ASPxLabel addrLab = cntrl.FindControl("ASPxLabel3") as ASPxLabel;
                if (addrLab != null)
                {
                    addrLab.Text = det.Address;
                }
            }
        }
Beispiel #6
0
 protected void gvBaganAkun_HtmlRowPrepared(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewTableRowEventArgs e)
 {
     if (e.VisibleIndex >= 0)
     {
         var header = e.GetValue("header_info").ToString();
         if (header == "H")
         {
             e.Row.BackColor = System.Drawing.ColorTranslator.FromHtml("#f0f4c3");
         }
     }
 }
Beispiel #7
0
        protected void gridMainLog_HtmlRowPrepared(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewTableRowEventArgs e)
        {
            if (e.RowType != DevExpress.Web.ASPxGridView.GridViewRowType.Data)
            {
                return;
            }
            ChannelLogEnum value = (ChannelLogEnum)e.GetValue("LogType");

            if (value == ChannelLogEnum.ChannelError)
            {
                e.Row.BackColor = System.Drawing.Color.Red;
            }
            else if (value == ChannelLogEnum.ProductError)
            {
                e.Row.BackColor = System.Drawing.Color.Orange;
            }
        }
Beispiel #8
0
        private void GetMergeInf(ref int startIndex, ref int rowSpan, DevExpress.Web.ASPxGridView.ASPxGridViewTableRowEventArgs e, string type)
        {
            string s = e.GetValue(type) as string;

            //string ljdm = e.GetValue("LJDM") as string;
            for (int i = 0; i < ASPxGridView1.VisibleRowCount; i++)
            {
                string _s = ASPxGridView1.GetRowValues(i, type) as string;
                //string _ljdm = ASPxGridView1.GetRowValues(i, "LJDM") as string;
                if (s == _s)//&& ljdm==_ljdm
                {
                    startIndex = i;
                    rowSpan++;
                }
            }
            startIndex = startIndex - rowSpan + 1;
        }