using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class dma_jh1 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
   
    //通用版居中
    protected void ASPxGridView_Loadcomm(object sender, EventArgs e)
    {
        DevExpress.Web.ASPxGridView agv = (DevExpress.Web.ASPxGridView)sender;

        foreach (DevExpress.Web.GridViewColumn col in agv.Columns)
        {
            col.CellStyle.HorizontalAlign = HorizontalAlign.Center;
            col.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
        }
              
    }

    //专业表
    protected void ASPxGridView_zy_BeforePerformDataSelect(object sender, EventArgs e)
    {
        this.Session["myxy"] = (sender as DevExpress.Web.ASPxGridView).GetMasterRowKeyValue();
    }
    protected void ASPxGridView_zy_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
    {
        e.NewValues["学院"] = this.Session["myxy"].ToString().Trim();
    }
    protected void ASPxGridView_zy_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
    {
        
    }

 

posted on 2019-11-28 11:39  qqhfeng16  阅读(263)  评论(0编辑  收藏  举报