How to Customize and Save Grid Layout in XMPro

How Can We Help?

< Back

Background:

The grid layout customization can be used in versions 6.1 and above. This option can be used when a grid has many columns and read-only fields.

Configuration:

This section demonstrates how to customize and save grid layout in forms.

Configuration:

  • Create a reference label.
  • Set the value of the reference label on load or refresh as shown in the example below:
stringquery = string.Format(@"EXEC sp_RequestReport_TRDataMetrics %27{0}%27, %27{1}%27, %27{2}%27, %27{3}%27",
activity.GetControlValue("DM1050StartDate"),
activity.GetControlValue("DM1060EndDate"),
activity.GetControlValue("DM1018TestSite"),
activity.GetControlValue("DM10180ProductLine"));
activity.SetControlValue("TD10180Savegrid" ,@"<iframe width='100%' height='700' frameborder='0' src='GridView.aspx?gridname=MainTR&columnHide=
True&noColumns=6&pagesize=15&cn=DataMaster&sp=" + query + "'></iframe>");
  • In the above example, change the stored procedure name to the one that returns the report and pass in any input parameters if required.
  • When setting the value to reference label, iframe has a property called gridname which can be any name.
  • The property columnhide defines whether the columns should be hidden when the grid is loaded.
  • The property noColumns defines the number of the columns to be shown in the grid by default and the rest of the columns will be added to the show customization filter control window.
  • The property cn is the connection string.
  • Below is a sample screenshot of a customized grid layout:
  • Clicking the Show customization window option, a pop up namely ‘Field Chooser’ will open and a user can drag and drop columns from and to the grid.
  • When a user clicks on save layout option, the current modified grid layout is saved and whenever a user opens the report, the saved layout is loaded by default.
  • When a user clicks on load layout, it loads the previously saved layout.

Note:

  • The grid is useful when columns are many and when fields are read-only.
  • Each user can pick which columns to be shown in the grid when they open the form by using the save layout option.
  • Columns in the grid are auto-generated.
Comments are closed.

This is the legacy version of the XMPro Documentation site. For the latest XMPro documentation, please visit documentation.xmpro.com

X