[C#.NET][Infopath 2010] 使用 XmlWriter 類別建立重覆表格

  • 6552
  • 0
  • C#
  • 2013-08-16

[C#.NET][Infopath 2010] 使用 XmlWriter 類別建立重覆表格

以前有寫過使用 XPathNavigator + XPathNodeIterator 建立重複表格

[InfoPath 2007] 如何使用程式加入列至重複表格 / How to Add Row to a Repeat Table(1)

[InfoPath 2007] 如何使用程式加入列至重複表格 / How to Add Row to a Repeat Table in Form Service(2)

今日則要使用XmlWriter來演練

1.首先先規劃好 Infopath 畫面

2010-5-16 下午 02-14-59

 

2. 在Loanding事件中加入以下程式

2010-5-16 下午 02-39-09

Note;my的命名空間是 http://schemas.microsoft.com/office/infopath/2003/myXSD/2010-05-16T06:00:30

執行結果

2010-5-16 下午 02-28-02

Note:跟以往一樣用用程式處理的 Repeat Table第一列都會空出來

3.處理空白列

2010-5-16 下午 02-34-50

 

執行 結果

2010-5-16 下午 02-36-50

範例下 載

XmlWriterRetable.zip

若有謬誤,煩請告知,新手發帖請多包涵


Microsoft MVP Award 2010~2017 C# 第四季
Microsoft MVP Award 2018~2022 .NET

Image result for microsoft+mvp+logo