AgilePoint Developer / General Use |
AgilePoint Developer contains the WFGridView control which functions exactly the same as the Microsoft ASP.NET GridView control. The GridView control is a frequently used control in the ASP.NET control toolkit for tabular data presentation.
For more information, see AgilePoint Web Controls
You can use the WFGridView control in an AgilePoint ASP.NET application, which integrates with an AgilePoint process model. Similar to the other AgilePoint developer controls, the WFGridView control has a BindingName property to map process model schema to the control.
To use the WFGridView control in an AgilePoint ASP.NET application, do the following.
A simple generic process with repeating schema:
Node Name | Node Type |
---|---|
Person | Complex Type |
PhoneNumber | Element |
<xs:element minOccurs="0" maxOccurs="unbounded" name="Person">
In this example, maxOccurs="unbounded" indicates the infinite number of repeating rows.
Node Name | Data Type |
---|---|
Name | String |
Address | String |
DOB | DateTime |
Ensure that the template creates the Submit.aspx and Review.aspx pages.
<ap:WFGridView ID="grdPeople" runat="server" AutoGenerateColumns="False" BindingName="/pd:myFields/pd:People" EnableModelValidation="True" InnerXmlTemplate="PHBkOlBlcnNvbiB4bWxuczpwZD0iaHR0cDovL3d3dy5hc2NlbnRuLmNvbS9icG0vWE1MU2NoZW1hIj48cGQ6TmFtZT5TdHJpbmc8L3BkOk5hbWU+PHBkOkFkZHJlc3M+U3RyaW5nPC9wZDpBZGRyZXNzPjxwZDpET0I+U3RyaW5nPC9wZDpET0I+PC9wZDpQZXJzb24+"> <Columns> <asp:BoundField DataField="pd:Name" HeaderText="Name" /> <asp:BoundField DataField="pd:Address" HeaderText="Address" /> <asp:BoundField DataField="pd:DOB" HeaderText="DOB" /> </Columns> </ap:WFGridView>
using System.Collections.Generic; using System.Xml; using System.IO;
This step is required only if the control is used on a web form, which starts the AgilePoint process.
if (!IsPostBack) { string peopleXML = "<pd:People xmlns:pd=\"http://www.ascentn.com/bpm/XMLSchema\"></pd:People>"; XmlTextReader xmlReader = new XmlTextReader(new StringReader(peopleXML)); XmlDocument xmlDocument = new XmlDocument(); XmlNode node = xmlDocument.ReadNode(xmlReader); grdPeople.SetBoundDataItem(node); }
DataTable dt = grdPeople.RepeatingSectionDataSource; if (dt != null) { DataRow child = dt.NewRow(); child[0] = "updates"; child["pd:Name"] = ""; child["pd:Address"] = ""; child["pd:DOB"] = ""; dt.Rows.Add(child); grdPeople.RepeatingSectionDataSource = dt; grdPeople.BindRepeatingSectionDataSoure(); }