You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blazor/gantt-chart/drag-and-drop.md
+11-64Lines changed: 11 additions & 64 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -130,7 +130,7 @@ Event Name |Description
130
130
131
131
In Gantt, the `OnRowDragStart` and `RowDropped` events are triggered on row drag and drop action. Using this event, you can prevent dragging of particular record, validate the drop position, and cancel the drop action based on the target record and dragged record. The following topics explains about this.
132
132
133
-
Prevent dragging of particular record
133
+
Prevent dragging of particular record
134
134
135
135
You can prevent drag action of the particular record by setting the `Cancel` property to `true`, which is available in the `OnRowDragStart` event argument based on our requirement. In the following sample, drag action was restricted for first parent record and its child records.
136
136
@@ -166,69 +166,16 @@ You can prevent drag action of the particular record by setting the `Cancel` pro
166
166
public int Progress { get; set; }
167
167
public int? ParentID { get; set; }
168
168
}
169
-
public static List <TaskData> GetTaskCollection() {
170
-
List <TaskData> Tasks = new List <TaskData> () {
171
-
new TaskData() {
172
-
TaskID = 1,
173
-
TaskName = "Project initiation",
174
-
StartDate = new DateTime(2019, 03, 28),
175
-
EndDate = new DateTime(2019, 07, 28),
176
-
Duration="4"
177
-
},
178
-
new TaskData() {
179
-
TaskID = 2,
180
-
TaskName = "Identify Site location",
181
-
StartDate = new DateTime(2019, 03, 29),
182
-
Progress = 30,
183
-
ParentID = 1,
184
-
Duration="2",
185
-
},
186
-
new TaskData() {
187
-
TaskID = 3,
188
-
TaskName = "Perform soil test",
189
-
StartDate = new DateTime(2019, 03, 29),
190
-
ParentID = 1,
191
-
Duration="4"
192
-
},
193
-
new TaskData() {
194
-
TaskID = 4,
195
-
TaskName = "Soil test approval",
196
-
StartDate = new DateTime(2019, 03, 29),
197
-
Duration = "4",
198
-
Progress = 30,
199
-
ParentID = 1
200
-
},
201
-
new TaskData() {
202
-
TaskID = 5,
203
-
TaskName = "Project estimation",
204
-
StartDate = new DateTime(2019, 03, 29),
205
-
EndDate = new DateTime(2019, 04, 2),
206
-
Duration="4",
207
-
},
208
-
new TaskData() {
209
-
TaskID = 6,
210
-
TaskName = "Develop floor plan for estimation",
211
-
StartDate = new DateTime(2019, 03, 29),
212
-
Duration = "3",
213
-
Progress = 30,
214
-
ParentID = 5
215
-
},
216
-
new TaskData() {
217
-
TaskID = 7,
218
-
TaskName = "List materials",
219
-
StartDate = new DateTime(2019, 04, 01),
220
-
Duration = "3",
221
-
Progress = 30,
222
-
ParentID = 5
223
-
},
224
-
new TaskData() {
225
-
TaskID = 8,
226
-
TaskName = "Estimation approval",
227
-
StartDate = new DateTime(2019, 04, 01),
228
-
Duration = "2",
229
-
ParentID = 5
230
-
}
231
-
};
169
+
public static List<TaskData> GetTaskCollection() => new List<TaskData> {
170
+
new TaskData { TaskID = 1, TaskName = "Project initiation", StartDate = new DateTime(2019, 03, 28), EndDate = new DateTime(2019, 07, 28), Duration = "4" },
171
+
new TaskData { TaskID = 2, TaskName = "Identify Site location", StartDate = new DateTime(2019, 03, 29), Progress = 30, ParentID = 1, Duration = "2" },
0 commit comments