Пример #1
0
 protected void grdDVT_CustomColumnDisplayText(object sender, DevExpress.Web.ASPxGridViewColumnDisplayTextEventArgs e)
 {
     if (e.Column.Caption == "STT")
     {
         e.DisplayText = (e.VisibleRowIndex + 1).ToString();
     }
 }
 protected void gvUsers_CustomColumnDisplayText(object sender, DevExpress.Web.ASPxGridViewColumnDisplayTextEventArgs e)
 {
     if (RestrictedFields.Contains(e.Column.FieldName))
     {
         e.DisplayText = "********";
     }
 }
Пример #3
0
 protected void grid_CustomGroupDisplayText(object sender, DevExpress.Web.ASPxGridViewColumnDisplayTextEventArgs e)
 {
     if (e.Column.FieldName == "ProductID")
     {
         var s = "<img src='images.jpg' width='20px' height='20px' />";
         e.DisplayText = s + " " + e.DisplayText;
     }
 }
Пример #4
0
 protected void gdvListaActividades_CustomGroupDisplayText(object sender, DevExpress.Web.ASPxGridViewColumnDisplayTextEventArgs e)
 {
     try
     {
         Listar();
     }
     catch (Exception ex)
     {
         throw new ApplicationException(ex.Message);
     }
 }
Пример #5
0
 protected void ASPxGridView_show_CustomColumnDisplayText(object sender, DevExpress.Web.ASPxGridViewColumnDisplayTextEventArgs e)
 {
     if (ASPxGridView_show.VisibleRowCount > 0)
     {
         if (e.Column.FieldName == "借出原因")
         {
             if (ASPxGridView_show.GetRowValues(e.VisibleIndex, "借出原因").ToString().Length > 10)
             {
                 e.DisplayText = ASPxGridView_show.GetRowValues(e.VisibleIndex, "借出原因").ToString().Substring(0, 10) + "...";
             }
         }
     }
 }
Пример #6
0
    protected void gvPatchDisplay_CustomColumnDisplayText(object sender, DevExpress.Web.ASPxGridViewColumnDisplayTextEventArgs e)
    {
        if (e.Column.Index != 0)
        {
            try
            {
                //stime = Server.UrlDecode(Request.Params["paraDate01"].ToString());
                //etime = Server.UrlDecode(Request.Params["paraDate02"].ToString());
                //locationkey = Server.UrlDecode(Request.Params["locationKey"].ToString());
                //partype = Server.UrlDecode(Request.Params["partType"].ToString());
                //pro_id = Server.UrlDecode(Request.Params["Pro_id"].ToString());
                //workorder = Server.UrlDecode(Request.Params["workorder"].ToString());
                //reason_code_class = Server.UrlEncode(Request.Params["reason_code_class"].ToString());

                string  startDate = string.Empty, endDate = string.Empty;
                string  headColumnName = e.Column.FieldName;
                DataRow dr             = (DataRow)gvPatchDisplay.GetDataRow(e.VisibleRowIndex);
                string  rowKey         = dr[gvPatchDisplay.KeyFieldName].ToString();

                if (headColumnName.ToUpper().Trim() == "REASON_CODE_NAME" || headColumnName.ToUpper().Trim() == "PressCells")
                {
                    return;
                }

                if (rowKey.Equals("合计") || rowKey.Equals("总计"))
                {
                    return;
                }

                e.DisplayText = string.Format("<a  target='_blank' href=\"CustCheckAndWarehouse.aspx?locationKey={1}&partType={2}&paraDate01={3}&paraDate02={4}&sType={5}&Pro_id={6}&opt={8}&workorder={7}&reason_code_class={9}\" class=\'dxgv\' style=\'text-decoration:underline;\'>{0}</a>", e.Value,
                                              Server.UrlEncode(_entity.LocationKeys), Server.UrlEncode(_entity.Pro_Type),
                                              Server.UrlEncode(_entity.Start_Time), Server.UrlEncode(_entity.End_Time),
                                              Server.UrlEncode(Resources.Lang.PATCH_QUANTITY), Server.UrlEncode(_entity.Pro_Ids),
                                              Server.UrlEncode(_entity.WoNumbers), Server.UrlEncode(rowKey),
                                              Server.UrlEncode(_entity.Reason_Code_Class));
            }
            catch (Exception ex)
            { }
        }
    }
 protected void gridDanhSachKH_CustomColumnDisplayText(object sender, DevExpress.Web.ASPxGridViewColumnDisplayTextEventArgs e)
 {
     Formats.InitDisplayIndexColumn(e);
 }