프로젝트

일반

사용자정보

개정판 f044f53d

IDf044f53d9d0197504b473bb59db01e16d822e38d
상위 cc0badd1
하위 585888da

김태성이(가) 일년 이상 전에 추가함

issue #00000 main grid에 makrus data 출력

Change-Id: If5b842ca79ea98506a3c4bad5b9b0826e3340a48

차이점 보기:

ID2.Manager/ID2.Manager.Dapper/Repository/DocumentRepository.cs
148 148

  
149 149
                //files.[FileID],files.[FileID] as AttFileID, files.RefID, files.Category, files.FileType, files.FileName, files.FilePath, files.FileExtension, files.FileData, files.Remark, files.CreatedDate, files.Creator,
150 150
                    string query = $@"
151
                            select  doc.*,
151
                            select  doc.*, datediff(SECOND, doc.ID2StartDate, doc.ID2EndDate) as ID2JobTime,
152 152
                            files.[FileID] as FileID, files.*,
153 153
                            markus.MARKUP_DATA_ID as MARKUP_DATA_ID, markus.*, 
154 154
                            datediff(SECOND, doc.ID2StartDate, doc.ID2EndDate) as ID2JobTime
ID2.Manager/ID2.Manager/Controls/DetailGridViewElement.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Drawing;
4
using System.Linq;
5
using System.Text;
6
using System.Threading.Tasks;
7
using Telerik.WinControls;
8
using Telerik.WinControls.Primitives;
9
using Telerik.WinControls.UI;
10

  
11
namespace ID2.Manager.Controls
12
{
13
    public class DetailGridViewElement : GridDetailViewCellElement
14
    {
15
        public DetailGridViewElement(GridViewColumn column, GridRowElement row) : base(column, row)
16
        {
17
            //this.BackColor = Color.Black;
18
            //this.BorderBoxStyle = BorderBoxStyle.SingleBorder;
19
        }
20

  
21
        protected override Type ThemeEffectiveType
22
        {
23
            get
24
            {
25
                return typeof(GridDetailViewCellElement);
26
            }
27
        }
28

  
29
        protected override RadPageViewItem CreatePageViewItem(IRadPageViewProvider pageViewProvider, GridViewInfo viewInfo)
30
        {
31
            RadPageViewItem item = base.CreatePageViewItem(pageViewProvider, viewInfo);
32

  
33
            RadPageViewExplorerBarItem explorerBarItem = item as RadPageViewExplorerBarItem;
34
            if (explorerBarItem != null)
35
            {
36
                explorerBarItem.AssociatedContentAreaElement.Children[0].MaxSize = new System.Drawing.Size(400, 402);
37
            }
38

  
39
            return item;
40
        }
41
    }
42
}
ID2.Manager/ID2.Manager/Controls/DetailGridViewTemplate.cs
11 11
    {
12 12
        public DetailGridViewTemplate()
13 13
        {
14
            
14
            this.AllowAddNewRow = false;
15
            this.AllowEditRow = false;
16
            this.ShowColumnHeaders = false;
15 17
        }
16 18
    }
17 19
}
ID2.Manager/ID2.Manager/Controls/DetailRowInfo.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6
using Telerik.WinControls.UI;
7

  
8
namespace ID2.Manager.Controls
9
{
10
    public class DetailRowInfo : GridViewRowInfo
11
    {
12
        public DetailRowInfo(GridViewInfo viewInfo) : base(viewInfo)
13
        {
14
        }
15

  
16
        public override Type RowElementType
17
        {
18
            get
19
            {
20
                return typeof(RowDetailViewRowElement);
21
            }
22
        }
23
    }
24
}
ID2.Manager/ID2.Manager/Controls/MarkupDetailCellElement.cs
1
using Newtonsoft.Json.Linq;
2
using System;
3
using System.Collections.Generic;
4
using System.Drawing;
5
using System.Linq;
6
using System.Text;
7
using System.Threading.Tasks;
8
using System.Windows.Forms;
9
using Telerik.WinControls.UI;
10

  
11
namespace ID2.Manager.Controls
12
{
13
    public  class MarkupDetailCellElement :  GridDetailViewCellElement
14
    {
15
        StackLayoutElement layoutRoot;
16
        RadListViewElement listView;
17
 
18
        public MarkupDetailCellElement(GridViewColumn column, GridRowElement row) : base(column, row)
19
        {
20
            this.MinSize = new Size(450,0);
21
            this.MaxSize = new Size(450,250);
22
            this.BackColor = Color.FromArgb(255, 225, 231, 239);
23
            this.BackColor2 = Color.FromArgb(255, 225, 231, 239);
24
            this.BackColor3 = Color.FromArgb(255, 225, 231, 239);
25
            this.BackColor4 = Color.FromArgb(255, 225, 231, 239);
26
            this.DrawBorder = false;
27
            this.DrawFill = false;
28
            this.Padding = new System.Windows.Forms.Padding(0,0,0,5);
29
            this.StretchVertically = false;
30
        }
31

  
32
        protected override Type ThemeEffectiveType
33
        {
34
            get
35
            {
36
                return typeof(GridDetailViewCellElement);
37
            }
38
        }
39

  
40
        
41
        protected override void CreateChildElements()
42
        {
43
            base.CreateChildElements();
44
            this.BackColor = Color.Transparent;
45
            layoutRoot = new StackLayoutElement();
46

  
47
            var textElement = new LightVisualElement();
48
            textElement.StretchHorizontally = false;
49
            textElement.BorderThickness = new Padding(0, 0, 0, 0);
50
            textElement.TextAlignment = ContentAlignment.MiddleLeft;
51
            textElement.ShouldHandleMouseInput = false;
52
            textElement.NotifyParentOnMouseInput = true;
53
            textElement.DrawFill = true;
54
            textElement.DrawBorder = true;
55
            textElement.Text = "Markup";
56
            layoutRoot.Children.Add(textElement);
57

  
58
            listView = new RadListViewElement();
59
         
60
            listView.ViewType = ListViewType.DetailsView;
61
            listView.ShowColumnHeaders = false;
62
            
63
            listView.ShouldHandleMouseInput = false;
64
            listView.NotifyParentOnMouseInput = true;
65
            
66
            listView.ShowGridLines = true;
67
            listView.HorizontalScrollState = ScrollState.AlwaysHide;
68
            
69
            //listView.BestFitColumns(ListViewBestFitColumnMode.AllCells);
70
            listView.ColumnCreating += ListView_ColumnCreating;
71
            
72
            layoutRoot.Orientation = System.Windows.Forms.Orientation.Horizontal;
73
            layoutRoot.Children.Add(listView);
74

  
75
            //this.Children.Add(layoutRoot);
76
        }
77

  
78
        private void ListView_ColumnCreating(object sender, ListViewColumnCreatingEventArgs e)
79
        {
80
            if (e.Column.FieldName == "NAME")
81
            {
82
                e.Column.AutoSizeMode = ListViewBestFitColumnMode.None;
83
                e.Column.MaxWidth = 60;
84
                e.Column.Width = 60;
85
            }
86
            else if (e.Column.FieldName == "CREATE_DATE")
87
            {
88
                e.Column.AutoSizeMode = ListViewBestFitColumnMode.None;
89
                e.Column.MaxWidth = 120;
90
                e.Column.Width = 120;
91
            }
92
            else
93
            {
94
                e.Column.MinWidth = 270;
95
                e.Column.MaxWidth = 270;
96
                //e.Column.AutoSizeMode = ListViewBestFitColumnMode.AllCells;
97
            }
98

  
99
        }
100

  
101
        protected override void SetContentCore(object value)
102
        {
103
            base.SetContentCore(value);
104
        }
105

  
106
        
107

  
108
        protected override void OnViewCellFormatting(CellFormattingEventArgs e)
109
        {
110
                base.OnViewCellFormatting(e);
111

  
112
                //if (!this.GridControl.MasterView.TableSearchRow.IsSearching)
113
                //{
114
                //if (!IsBinding)
115
                //{
116
                List<Markup> markups = new List<Markup>();
117
                var markup = (this.HierarchyRow.DataBoundItem as ID2.Manager.Data.Models.Documents).Markups;
118

  
119
                listView.DataSource = markup;
120

  
121
                //if (!string.IsNullOrWhiteSpace(markup))
122
                //{
123
                //    var items = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Markup>>(markup);
124
                //    listView.DataSource = items;
125
                 
126
                //    listView.SelectedItem = null;
127
                ////this.Focus();
128
                //    listView.BestFitColumns(ListViewBestFitColumnMode.DataCells);
129
                //}
130
                //else
131
                //{
132
                //    this.Text = "null";
133
                //}
134
            //}
135
                //IsBinding = true;
136
            //}
137
        }
138

  
139
        protected override void UpdateInfoCore()
140
        {
141
            base.UpdateInfoCore();
142
        }
143

  
144
        protected override GridTableElement CreateChildTableElement()
145
        {
146
            var table = base.CreateChildTableElement();
147
            table.TableHeaderHeight = 0;
148
            //table.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
149
            return table;
150
        }
151

  
152
        public override void UpdateInfo()
153
        {
154
            base.UpdateInfo();
155

  
156
        }
157
    }
158

  
159
    public class Markup
160
    {
161
        //public string PROJECT_NO { get; set; }
162
        //public string DOCUMENT_ID { get; set; }
163
        //public string MARKUP_DATA_ID { get; set; }
164
        //public int PAGENUMBER { get; set; }
165

  
166
        public string NAME { get; set; }
167
        public string Text { get; set; }
168

  
169
        private string create_Date;
170

  
171
        public string CREATE_DATE
172
        {
173
            get
174
            { return create_Date; }
175

  
176
            set
177
            {
178
                create_Date = Convert.ToDateTime(value).ToString("yyyy-MM-dd HH:mm");
179
            }
180
        }
181
    }
182
}
ID2.Manager/ID2.Manager/Controls/MarkupIconItem.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6

  
7
namespace ID2.Manager.Controls
8
{
9
    public class MarkupIconItem
10
    {
11

  
12
    }
13
}
ID2.Manager/ID2.Manager/Controls/MarkupListViewItem.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Drawing;
4
using System.Linq;
5
using System.Text;
6
using System.Threading.Tasks;
7
using System.Windows.Forms;
8
using Telerik.WinControls.Layouts;
9
using Telerik.WinControls.UI;
10

  
11
namespace ID2.Manager.Controls
12
{
13
    public class MarkupListViewItem : SimpleListViewVisualItem
14
    {
15
        private LightVisualElement textElement;
16
        private LightVisualElement nameElement;
17
        private LightVisualElement dateElement;
18
        private StackLayoutPanel stackLayout;
19

  
20
        protected override void CreateChildElements()
21
        {
22
            base.CreateChildElements();
23
            
24
            this.stackLayout = new StackLayoutPanel();
25
            this.stackLayout.Orientation = Orientation.Horizontal;
26
            this.stackLayout.EqualChildrenWidth = true;
27
            this.stackLayout.ShouldHandleMouseInput = false;
28
            this.stackLayout.NotifyParentOnMouseInput = true;
29

  
30
            this.nameElement = new LightVisualElement();
31
            this.nameElement.StretchHorizontally = true;
32
            this.nameElement.MinSize = new Size(120, 0);
33
            this.nameElement.BorderThickness = new Padding(1);
34
            this.nameElement.TextAlignment = ContentAlignment.MiddleCenter;
35
            this.nameElement.ShouldHandleMouseInput = false;
36
            this.nameElement.NotifyParentOnMouseInput = true;
37
            this.stackLayout.Children.Add(this.nameElement);
38

  
39
            this.textElement = new LightVisualElement();
40
            this.textElement.StretchHorizontally = true;
41
            this.textElement.MinSize = new Size(200, 0);
42
            this.textElement.BorderThickness = new Padding(0,1,0,1);
43
            this.textElement.TextAlignment = ContentAlignment.MiddleLeft;
44
            this.textElement.ShouldHandleMouseInput = false;
45
            this.textElement.NotifyParentOnMouseInput = true;
46
            this.stackLayout.Children.Add(this.textElement);
47

  
48

  
49
            this.dateElement = new LightVisualElement();
50
            this.dateElement.StretchHorizontally = true;
51
            this.dateElement.MinSize = new Size(120, 0);
52
            this.dateElement.BorderThickness = new Padding(0, 1, 1, 1);
53
            this.dateElement.TextAlignment = ContentAlignment.MiddleCenter;
54
            this.dateElement.ShouldHandleMouseInput = false;
55
            this.dateElement.NotifyParentOnMouseInput = true;
56
            this.stackLayout.Children.Add(this.dateElement);
57

  
58
            this.Children.Add(this.stackLayout);
59
        }
60

  
61
        protected override void SynchronizeProperties()
62
        {
63
            base.SynchronizeProperties();
64

  
65
            this.Text = "";
66
            this.dateElement.Text = Convert.ToDateTime(this.Data["CREATE_DATE"]).ToString("yyyy-MM-dd HH:mm");
67
            this.textElement.Text = Convert.ToString(this.Data["Text"]);
68
            this.nameElement.Text = Convert.ToString(this.Data["NAME"]);
69
        }
70

  
71
        protected override Type ThemeEffectiveType
72
        {
73
            get
74
            {
75
                return typeof(SimpleListViewVisualItem);
76
            }
77
        }
78
    }
79
}
ID2.Manager/ID2.Manager/Controls/RowDetailViewRowElement.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Drawing;
4
using System.Linq;
5
using System.Text;
6
using System.Threading.Tasks;
7
using Telerik.WinControls.UI;
8

  
9
namespace ID2.Manager.Controls
10
{
11
    public class RowDetailViewRowElement : GridDetailViewRowElement
12
    {
13
        public RowDetailViewRowElement()
14
        {
15
        }
16

  
17
        protected override Type ThemeEffectiveType
18
        {
19
            get { return typeof(GridDetailViewRowElement); }
20
        }
21
        //protected override SizeF MeasureOverride(SizeF availableSize)
22
        //{
23
        //    this.ContentCell.ChildTableElement.StretchHorizontally = false;
24
        //    return base.MeasureOverride(availableSize);
25
        //}
26
        //protected override SizeF ArrangeOverride(SizeF finalSize)
27
        //{
28
        //    base.ArrangeOverride(finalSize);
29

  
30
        //    RectangleF clientRect = GetClientRectangle(finalSize);
31

  
32
        //    float x = clientRect.Left;
33

  
34
        //    x = this.TableElement.Size.Width / 2 - (clientRect.Left + TableElement.CellSpacing + ContentCell.DesiredSize.Width + this.TableElement.VScrollBar.Size.Width) / 2;
35

  
36
        //    ContentCell.Arrange(new RectangleF(x, clientRect.Top, clientRect.Width, clientRect.Height));
37
        //    return finalSize;
38
        //}
39

  
40
        protected override void CreateChildElements()
41
        {
42
            //base.CreateChildElements();
43
            //this.Margin = new System.Windows.Forms.Padding(10,1,0,5);
44
        }
45

  
46
        public override void Synchronize()
47
        {
48
            base.Synchronize();
49
        }
50
    }
51
}
ID2.Manager/ID2.Manager/ID2.Manager.csproj
117 117
    <Compile Include="Controls\BriefAndImages.Designer.cs">
118 118
      <DependentUpon>BriefAndImages.cs</DependentUpon>
119 119
    </Compile>
120
    <Compile Include="Controls\DetailGridViewElement.cs" />
121 120
    <Compile Include="Controls\DetailGridViewTemplate.cs">
122 121
      <SubType>Component</SubType>
123 122
    </Compile>
124
    <Compile Include="Controls\MarkupDetailCellElement.cs" />
125
    <Compile Include="Controls\MarkupListViewItem.cs" />
126 123
    <Compile Include="Controls\OpenProjectView.cs">
127 124
      <SubType>UserControl</SubType>
128 125
    </Compile>
......
132 129
    <Compile Include="Controls\PDFViewer.cs">
133 130
      <SubType>UserControl</SubType>
134 131
    </Compile>
135
    <Compile Include="Controls\RowDetailViewRowElement.cs" />
136 132
    <Compile Include="Controls\SearchRow.cs" />
137 133
    <Compile Include="Forms\AddUser.cs">
138 134
      <SubType>Form</SubType>
ID2.Manager/ID2.Manager/Main.cs
42 42
            }
43 43
        }
44 44

  
45
        private string dockLayoutPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), Application.ProductName, 
46
            "dock.xml");
45
        private string dockLayoutPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), Application.ProductName,
46
         "dock.xml");
47 47

  
48 48
        readonly Informations informations = Informations.Instance;
49 49
        bool IsID2Manager = false;
......
65 65
        {
66 66
            InitializeComponent();
67 67

  
68
            var appDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), Application.ProductName);
69

  
70
            if(!Directory.Exists(appDataPath))
71
            {
72
                Directory.CreateDirectory(appDataPath);
73
            }
74

  
68 75
            ID2.Manager.Common.Helpers.TableLayoutPanelHelper.SetDoubleBuffered(this);
69 76

  
70 77
            this.FormClosing += Main_FormClosing;
......
87 94

  
88 95
            this.radGridViewDocuments.SelectionChanged += RadGridViewDocuments_SelectionChanged;
89 96
            this.radGridViewDocuments.ViewCellFormatting += RadGridViewDocuments_ViewCellFormatting;
90
            this.radGridViewDocuments.CreateRow += RadGridViewDocuments_CreateRow;
91 97
            this.radGridViewDocuments.CreateRowInfo += RadGridViewDocuments_CreateRowInfo;
92
            this.radGridViewDocuments.CreateCell += RadGridViewDocuments_CreateCell1;
93 98
            this.radGridViewDocuments.CellBeginEdit += RadGridViewDocuments_CellBeginEdit;
94 99
            this.radGridViewDocuments.CommandCellClick += RadGridViewDocuments_CommandCellClick;
95 100
            this.radGridViewDocuments.MasterView.TableSearchRow.SearchProgressChanged += TableSearchRow_SearchProgressChanged;
......
104 109
            {
105 110
                Dock = DockStyle.Fill
106 111
            };
112

  
107 113
            this.backstageViewPageOpenProject.Controls.Add(openProjectView);
108 114
            openProjectView.OpenProjectClick += OpenProjectView_OpenProjectClick;
109 115
            openProjectView.CloseProjectClick += OpenProjectView_OpenProjectClick;
......
123 129

  
124 130
        private void SaveDockingLayout()
125 131
        {
126
            this.DockMain.SaveToXml(dockLayoutPath);
132
            try
133
            {
134
                this.DockMain.SaveToXml(dockLayoutPath);
135
            }
136
            catch (Exception ex)
137
            {
138
                System.Diagnostics.Debug.WriteLine("SaveDockingLayout Error.", ex);
139
            }
127 140
        }
128 141

  
129 142
        private void LoadDockingLayout()
130 143
        {
131
            if (File.Exists(dockLayoutPath))
144
            try
132 145
            {
133
                this.DockMain.LoadFromXml(dockLayoutPath);
146
                if (File.Exists(dockLayoutPath))
147
                {
148
                    this.DockMain.LoadFromXml(dockLayoutPath);
149
                }
150
                else
151
                {
152
                    File.Create(dockLayoutPath);
153
                }
154

  
155
                this.DockMain.DockWindowClosed += (snd, evt) =>
156
                {
157
                    evt.DockWindow.DockState = Telerik.WinControls.UI.Docking.DockState.AutoHide;
158

  
159
                    this.DockMain.AutoHideWindows(new Telerik.WinControls.UI.Docking.DockWindow[] { evt.DockWindow }, Telerik.WinControls.UI.Docking.AutoHidePosition.Right);
160
                };
134 161
            }
135
            
136
            this.DockMain.DockWindowClosed += (snd, evt) =>
162
            catch (Exception ex)
137 163
            {
138
                evt.DockWindow.DockState = Telerik.WinControls.UI.Docking.DockState.AutoHide;
139

  
140
                this.DockMain.AutoHideWindows(new Telerik.WinControls.UI.Docking.DockWindow[] { evt.DockWindow }, Telerik.WinControls.UI.Docking.AutoHidePosition.Right);
141
            };
164
                System.Diagnostics.Debug.WriteLine("LoadDockingLayout Error.",ex);
165
            }
142 166
        }
143 167

  
144 168
        private void Main_FormClosing(object sender, FormClosingEventArgs e)
......
146 170
            SaveDockingLayout();
147 171
        }
148 172

  
149
      
150

  
151 173
        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
152 174
        {
153 175
            if (keyData == (Keys.F10 | Keys.Control))
......
180 202
                    {
181 203

  
182 204
                        /// 도프텍 or 삼성
183
                        if (informations.ActiveUser.Role != "Manager")
205
                        if (!string.IsNullOrEmpty(informations.ActiveUser.RefProjectID))
184 206
                        {
185 207
                            IsDoftech = false;
186 208
                        }
......
243 265
                                briefAndImagesValidation.AddFrImage(imageInfo, true);
244 266
                                break;
245 267
                        }
246

  
247
                        MessageBox.Show("수정 필요!!!!!!!!!");
248 268
                    }
249 269
                }
250 270
            }
......
258 278
            {
259 279
                e.RowInfo = new SearchRow(e.ViewInfo);
260 280
            }
281

  
282
            System.Diagnostics.Debug.WriteLine(e.RowInfo.GetType().Name);
261 283
        }
262 284

  
263 285
        private void TableSearchRow_SearchProgressChanged(object sender, SearchProgressChangedEventArgs e)
......
606 628

  
607 629
        private void InitializeGridViewDetail()
608 630
        {
631
            DetailGridViewTemplate markupList = new DetailGridViewTemplate();
632

  
633
            markupList.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.None;
634
           
635
            GridViewTextBoxColumn userColumn = new GridViewTextBoxColumn("CREATE_USER");
636
            GridViewTextBoxColumn textColumn = new GridViewTextBoxColumn("TEXT");
637

  
638
            userColumn.AutoSizeMode = BestFitColumnMode.AllCells;
639
            textColumn.AutoSizeMode = BestFitColumnMode.AllCells;
640

  
641
            markupList.Columns.AddRange(userColumn, textColumn);
642
            this.radGridViewDocuments.MasterTemplate.Templates.Add(markupList);
643
            markupList.HierarchyDataProvider = new GridViewEventDataProvider(markupList);
644

  
609 645
            this.radGridViewDocuments.ChildViewExpanded += RadGridViewDocuments_ChildViewExpanded;
646
            this.radGridViewDocuments.RowSourceNeeded += RadGridViewDocuments_RowSourceNeeded;
647
        }
648

  
649
        private void RadGridViewDocuments_RowSourceNeeded(object sender, GridViewRowSourceNeededEventArgs e)
650
        {
651
            if (e.Template.HierarchyLevel == 1)
652
            {
653
                if (e.ParentRow.DataBoundItem is Documents documents)
654
                {
655
                    if (documents.Markups != null)
656
                    {
657
                        foreach (var makrup in documents.Markups)
658
                        {
659
                            GridViewRowInfo row = e.Template.Rows.NewRow();
660

  
661
                            row.Cells["CREATE_USER"].Value = makrup.CREATE_USER;
662
                            row.Cells["TEXT"].Value = makrup.TEXT;
663
                            e.SourceCollection.Add(row);
664
                        }
665

  
666
                        e.Template.BestFitColumns();
667
                    }
668
                }
669
            }
610 670
        }
611 671

  
612 672
        private void RadGridViewDocuments_ChildViewExpanded(object sender, ChildViewExpandedEventArgs e)
613 673
        {
614
            //e.ChildRow.ChildViewInfos[0].ChildRows[0].Height = 152;
615
            //e.ChildRow.ChildViewInfos[2].ChildRows[0].Height = 152;
616
            e.ChildRow.Height = 224;
617 674
        }
618 675

  
619 676
#endregion
......
1183 1240
            }
1184 1241
        }
1185 1242

  
1186
        private void RadGridViewDocuments_CreateRow(object sender, GridViewCreateRowEventArgs e)
1187
        {
1188
            if (e.RowType == typeof(GridDetailViewRowElement))
1189
            {
1190
                //if (e.RowInfo.ChildRows.Count() > 0)
1191
                //{
1192
                    e.RowElement = new RowDetailViewRowElement();
1193
                
1194
                //}
1195
                //else
1196
                //{
1197
                //    e.RowElement = null;
1198
                //}
1199
            }
1200
        }
1201

  
1202

  
1203
        private void RadGridViewDocuments_CreateCell1(object sender, GridViewCreateCellEventArgs e)
1204
        {
1205
            if (e.CellType == typeof(GridDetailViewCellElement))
1206
            {
1207
                //if (e.Row.RowInfo.ChildRows.Count() > 0)
1208
                //{
1209
                e.CellElement = new MarkupDetailCellElement(e.Column, e.Row);
1210
                //}
1211
            }
1212
        }
1213

  
1214

  
1215 1243
        private void RadGridViewDocuments_ViewCellFormatting(object sender, CellFormattingEventArgs e)
1216 1244
        {
1217 1245
            if (e.Row is GridViewDataRowInfo)
1218 1246
            {
1247
                System.Diagnostics.Debug.WriteLine(e.CellElement.GetType().Name);
1248
                
1219 1249
                if (e.CellElement is GridRowHeaderCellElement)
1220 1250
                {
1221 1251
                   // if (e.CellElement.RowIndex > -1)
1222 1252
                  //      e.CellElement.Text = (e.CellElement.RowIndex + 1).ToString();
1223 1253
                }
1254
                else if (e.CellElement is GridGroupExpanderCellElement expanderCellElement)
1255
                {
1256
                    if((e.Row.DataBoundItem as Documents).Markups == null)
1257
                    {
1258
                        expanderCellElement.Enabled = false;
1259
                    }
1260
                }
1224 1261
                else
1225 1262
                {
1226 1263
                    var result = e.Row.DataBoundItem as Documents;
......
1248 1285
                    }
1249 1286
                }
1250 1287
            }
1288
            else if(e.Row is GridViewDetailsRowInfo)
1289
            {
1290
                if (e.CellElement is GridDetailViewCellElement detailViewCellElement)
1291
                {
1292
                    detailViewCellElement.Padding = new Padding(2);
1293
                }
1294
            }
1251 1295
            //else if (e.Row is GridViewSummaryRowInfo)
1252 1296
            //{
1253 1297
            //    if (e.CellElement is GridRowHeaderCellElement)
......
1265 1309

  
1266 1310
            //    }
1267 1311
            //}
1268
            else if(e.Row is GridViewDetailsRowInfo)
1269
            {
1270
                if(e.CellElement is MarkupDetailCellElement element)
1271
                {
1272
                    //element.UpdateInfo();
1273
                }
1274
            }
1275 1312
            else
1276 1313
            {
1277 1314

  

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)