Do you have any example of how to use WFDataGrid web control?

Expand / Collapse
 
     

Do you have any example of how to use WFDataGrid web control?


The information in this article applies to:

  • AgilePoint Suite
  • AgilePoint Enterprise Manager
  • AgilePoint Envision
  • AgilePoint Developer
  • AgilePoint Server

GOAL(S)
  To use WFDataGrid ot bind and display data from AgilePoint.
   
SUMMARY
  WFDataGrid binds with a xml serialzed dataset.
   
SOLUTION
 

The following is an example of how to use WFDataGrid:

protected Ascentn.Workflow.WebControls.WFDataGrid WFDataGrid1;

private void ButtonShowProcess_Click(object sender, System.EventArgs e)

{

      // query all process instances for selected process template

      string sql = string.Format("select PROC_INST_NAME, STATUS, LAST_MODIFIED_BY, LAST_MODIFIED_DATE, STARTED_DATE, DUE_DATE, COMPLETED_DATE from WF_PROC_INSTS where DEF_NAME='{0}'", WFProcessTemplateDropDownList2.SelectedItem.Text.ToString() );       

      string xml = this.GetAPI().QueryDatabase(sql);

      DataSet d = new DataSet();

      System.IO.StringReader sr = new System.IO.StringReader(xml);

      System.Xml.XmlTextReader xr = new System.Xml.XmlTextReader(sr);

      if (xml != "<DataSet />")

      {

            d.ReadXml( xr );

      }

      else

      {

            d = null; //reset the datasource and DataGrid

      }

      xr.Close();

      WFDataGrid1.DataSource = d;

      WFDataGrid1.DataBind();

}

   
Last Reviewed:  
Keywords:  

Add Your Comments


Name: *
Email Address:
Web Address:
Verification Code:
*
 

Details
Last Modified:Tuesday, September 12, 2006
Last Modified By: Brian A
Type: HOWTO
Article not rated yet.
Article has been viewed 490 times.
Options