Пример #1
0
 /// <summary>
 /// 行绑定事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void GridStudyRoom_OnPreRowDataBound(object sender, FineUI.GridPreRowEventArgs e)
 {
     //FineUI.LinkButtonField lbfx = GridStudyRoom.FindColumn("StudyRoomdelete") as FineUI.LinkButtonField;
     //DataRowView rowx = e.DataItem as DataRowView;
     //string roomnox = rowx[0].ToString();
     //lbfx.OnClientClick = WindowDelete.GetShowReference("../SystemSet/DeletePassword.aspx?Type=StudyRoom&id=" + roomnox + "", "阅览室删除");
 }
Пример #2
0
        /// <summary>
        /// 这个事件会在渲染每一行前调用,因此改变了列的属性,那么渲染每一行时此列的属性都发生了变化
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Grid1_PreRowDataBound(object sender, FineUI.GridPreRowEventArgs e)
        {
            LinkButtonField lbfAction1  = Grid1.FindColumn("lbfAction1") as LinkButtonField;
            LinkButtonField lbfAction2  = Grid1.FindColumn("lbfAction2") as LinkButtonField;
            CheckBoxField   cbxAtSchool = Grid1.FindColumn("cbxAtSchool") as CheckBoxField;

            if (e.RowIndex < 5)
            {
                cbxAtSchool.Enabled = true;
                lbfAction1.Enabled  = true;
                lbfAction2.Enabled  = true;
            }
            else
            {
                cbxAtSchool.Enabled = false;
                lbfAction1.Enabled  = false;
                lbfAction2.Enabled  = false;
            }

            // 如果绑定到 DataTable,那么这里的 DataItem 就是 DataRowView
            HyperLinkField linkField = Grid1.Columns[4] as HyperLinkField;
            DataRowView    row       = e.DataItem as DataRowView;

            if (row != null)
            {
                linkField.DataTextFormatString = "{0} (" + row["EntranceYear"].ToString() + ")";
            }
        }
 /// <summary>
 /// 行绑定事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void VRGrid_OnPreRowDataBound(object sender, FineUI.GridPreRowEventArgs e)
 {
 }