Example #1
0
        protected override void OnPreRender(EventArgs e)
        {
            foreach (GridViewRow row in TheGrid.Rows)
            {
                if (row.RowType == DataControlRowType.DataRow)
                {
                    ServerPartition partition = Partitions[row.RowIndex];

                    if (partition != null)
                    {
                        if (_theController.CanDelete(partition))
                        {
                            row.Attributes.Add("candelete", "true");
                        }
                    }
                }
            }
            base.OnPreRender(e);
        }
Example #2
0
        protected void PartitionGridView_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (PartitionGridView.EditIndex != e.Row.RowIndex)
            {
                if (e.Row.RowType == DataControlRowType.DataRow)
                {
                    CustomizeActiveColumn(e);
                    CustomizeAcceptAnyDeviceColumn(e);
                    CustomizeDuplicateSopPolicyColumn(e.Row);
                    CustomizePartitionStorageConfiguration(e.Row);

                    var partition = e.Row.DataItem as ServerPartition;

                    if (partition != null)
                    {
                        if (_theController.CanDelete(partition))
                        {
                            e.Row.Attributes.Add("candelete", "true");
                        }
                    }
                }
            }
        }