IT tutorials
 
Applications Server
 

Microsoft Dynamic AX 2009 : Developing Web User Interface Components (part 2)

1/12/2013 5:50:29 PM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

AxFilterControl

If the ShowFilter property of AxGridview is set to true, AxGridView embeds AxFilterControl. AxFilterControl is displayed at the top of AxGridView. AxFilterControl reads the metadata from the AxDataSourceControl the AxGridView is binding to and displays controls dynamically to allow the user to filter the data source with any of its field that are not hidden or locked. You can access the filter control through the AxGridView FilterControl property and the filter XML through Filter.

The filter control sets the filter on AxDataSetView using AxDataSourceView, which is responsible for keeping the data in sync with the filter set by calling SetAsChanged and ExecuteQuery if data has changed. AxDataSourceView and DataSetView expose the SystemFilter and UserFilter properties and the ResetUserFilter method APIs for the filter control to set the filter programmatically.

For example, you can set the range in the data set in X++ as follows.

qbrBlocked = qbds.addRange(fieldnum(CustTable,Blocked));qbrBlocked.value(queryValue-
(CustVendorBlocked::No));qbrBlocked.status(RangeStatus::Hidden);

					  


In the Web User Control, you can read the SystemFilter set on the data source.

this.AxDataSource1.GetDataSourceView(this.AxGridView1.DataMember).SystemFilter.ToXml()

					  


or

this.AxDataSource1.GetDataSet().DataSetViews[this.AxGridView1.DataMember].
SystemFilter.ToXml();


returns

<?xml version="1.0" encoding="utf-16"?><filter xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CustTable">-
<condition attribute="Blocked" operator="eq" value="No" status="hidden" /></filter>

					  


DataSourceView and DataSetView have the following methods, which allow you to read the different types of filters and reset them.

  • SystemFilter gets the complete list of ranges on the query, including open, hidden, and locked, into the conditionCollection on the filter object.

  • UserFilter gets only the open ranges on the QueryRun into the conditionCollection on the filter object.

  • ResetFilter method clears the filter set on the QueryRun and thus resets to the filter (ranges) set programmatically.

Here is a code snippet to set the filter programmatically.

this.AxDataSource1.GetDataSourceView(this.AxGridView1.DataMember).SystemFilter.AddXml-
(@"<filter name='CustTable'><condition attribute='CustGroup' status='open' value='10'
operator='eq' /></filter>");

					  


AxForm

AxForm displays a single record from a data source, where each data row represents a field in the record. The first column in the row often displays the name of the field, and the second column displays the value of the field for the record. The AxForm control allows you to view, create, and update a single record.

AxForm is a data-bound control with built-in data modification capabilities. When you use AxForm with the declarative AxDataSource control, you can easily configure it to display and modify data without needing to write any code. It also provides a rich set of properties, methods, and events you can customize with application-specific user interface logic.

The DataSourceID, DataMember, and DataKeyNames properties define the data-binding capabilities of the AxForm control. AxForm also provides properties to autogenerate action buttons, setting their text and the mode. You set the UpdateOnPostback property if you want the record cursor to be updated at post back so that other controls can read the change. AxForm also provides events for all the actions that can be taken on the form before and after that action is completed. You can write code in these events for user interface or application-specific logic before or after the action is completed.

The AxForm control is a container for a collection of controls. If your form contains many fields and requires visually grouping the related fields, allowing them to be expanded or collapsed, you use the AxMultiSection control inside the AxForm control. If your form is simple and has only a few fields, you can use the AxGroup control.

AxMultiSection

AxMultiSection allows you to define a collection of AxSection controls, where each AxSection control contains child controls. By default, all sections are in expanded mode and rendered vertically, one after the other. Users can keep any number of them in expanded or collapsed mode. You can also configure AxMultiSection so that only one section is expanded at any point. In this mode, expanding a second section causes the first one to collapse, keeping just one section active. Set the ActiveMode property to true to enable that behavior. You use the ActiveSectionIndex property to get or set the active section. The AxMultiSection component can contain only AxSection components.

AxSection

AxSection is a generic control container. Any control can be a child of AxSection. All AxSection controls are rendered vertically, one after the other. Each AxSection includes a header that contains the title of the section and an image button that allows the user to expand or collapse the section. AxSection provides properties to display or hide the header and border. You can also set a security key on AxSection so that it’s visible only to users who have access to that security key in Dynamics AX. You can also write code when the section is expanded or collapsed through the events exposed by AxSection.

 
Others
 
- Microsoft Dynamic AX 2009 : Developing Web User Interface Components (part 1)
- SharePoint 2010 : Service Applications - Creating the Secure Store
- SharePoint 2010 : Service Applications - Managing a service
- System Center Configuration Manager 2007 : Proving the Concepts (part 2) - Testing in the POC Phase
- System Center Configuration Manager 2007 : Proving the Concepts (part 1) - Building the Proof of Concept Environment
- BizTalk Server 2009 : Administrative Tools (part 4) - MSBuild
- BizTalk Server 2009 : Administrative Tools (part 3) - ExplorerOM
- BizTalk Server 2009 : Administrative Tools (part 2) - WMI
- BizTalk Server 2009 : Administrative Tools (part 1) - BizTalk Administration Console, BTSTask
- Microsoft Dynamic GP 2010 : Understanding all of the financial information about an asset with Fixed Asset Details
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us