Skip to main content
Hi

currently i have a K2datagrid at VB.net, i need to retrieve a column of value so that i can continue to process a calculation from the total value(collection of a column datagrid)! i have use the following code but it seem that is does not work! ideas?

Dim myproc As SourceCode.K2ROM.ProcessInstance
Dim myxml As String

myproc = conn.CreateProcessInstance("ProjectProcess 1")

myxml = myproc.XmlFields.Item("unit").Value()

"unit " is the XML field for a column of K2datagrid.
In your example, myproc.XmlFields.Item("unit").Value would be referencing the value of the XML data field, which would be the entire XML structure.
For example, assuming that your XML data field "unit" contains the following structure:
<Root>
<LeaveDetails>
<StartDate>01-01-01</StartDate>
<EndDate>03-01-01</EndDate>
<Days>3</Days>
</LeaveDetails>
</Root>

In your given code, myxml will contain the above structure.
To parse the XML structure, the standard XMLDocument methods apply.
Get value from a column in datagrid for calculation. Try K2GridFormlua. Can choose which XML, which datagrid column value u want. Hope it works! 😉

Reply