In the rapid development platform, how to bulk update the grid part data? Today we introduce the 2 ways of the platform:
650) this.width=650; "id=" aimg_1048 "src=" http://bbs.delit.cn/data/attachment/forum/201602/18/ 220407r5e2nngdeefn2eu0.png.thumb.jpg "width=" 399 "height=" 126 "alt=" 220407r5e2nngdeefn2eu0.png.thumb.jpg "/>
Method One:
Quickly build a batch update of your data using the Smart Wizards of the fast development platform itself.
Bulk Update data functions: setcolumnvalue (stringfiledname, Objectvalue, intscope)
Role
Gets the value of the field of the focus row.
Parameters
parameter one: FieldName
string type, field name.
Parameter two: value
An object type that updates the value.
Parameter three: scope
an int type that updates the range.
Update Range Value Comparison table:
0
Focus Line
1
All rows
2
Select BOC
3
New row
4
Modify rows
5
New and modified rows
6
Delete Row
7
Modified and deleted rows
8
Lines that are not changed
9
Tag line
return value
no return value.
Example
< Span> production planning Batch import. Setcolumnvalue ( " unit of measure " kilogram " ,1)
650) this.width=650; "id=" aimg_1047 "src=" http://bbs.delit.cn/data/attachment/forum/201602/18/ 215608exoxewsyb2elq1xq.png.thumb.jpg "alt=" 215608exoxewsyb2elq1xq.png.thumb.jpg "/>
Method Two:
Using the method of the DataTable class, loop the table each row and set the field values.
' defines a variable store that gets the DataTable for the current grid part. Production Plan Bulk Import is the current grid part name
Dim dt= Production Planning Batch import. DataTable
' For Each loop all rows in the current DT
for each Dr inch dt. Rows
' Set each row of data
dr[" encoded "]= " kg "
Next
Original address: http://bbs.delit.cn/thread-705-1-1.html
Reprint please specify the source:
Author: metric Technology http://www.delit.cn
Metric rapid development platform: Mesh Parts Batch Update data