Filter & Grouping:  When a user right mouse clicks on a datagrid cell a popupmenu is displayed providing options to group and filter the datagrid. It will also display options to remove any grouping or filters set by the user.

Datagrid format:   Clicking on the Tools in the control provides the user with options to format the datagrid.

All the design options (expect Source) in Datagrid plus start with the letter x:

Source: The control will search the control tree and find the nearest datagrid. It will then use the item source of the datagrid as it’s source. You can however define the source here, and it will set the datagrid source as well. You might want to do this if you change the data sources in code.

xAlternatingRowsDifferent: True means datagrid will display rows in alternating colour, False will set all rows to the same colour.

xDomainContext: If you put the name of the domain context in here, the control will call submit changes every time the row is updated.

xEntity & xEntitySet: To add a new blank record you need to set both these item. (normally you would set this in code behind - see example below)

xFilterOption & xGroupbyOption: By default these are set to True which means the user can right click in the datagrid and bring up filter and groupby options. Set these to False if you do not want to provide these features.

xHidePager: Set to false if you do not want to display the pager control.

xHideTools: Set to false if you do not want to display the options to format the datagrid.

xIsBusy: displays a Busy indicator if set to True:

xLocalisation: Defines the the default language used. Currently supports four languages used in the menus to provide format, grouping and filtering the datagrid. The tools options allows the user to change the language. If not set English UK is used.



The following is an example to load the data, adding a blank row and displaying a busy indicator.

LoadOperation<tblResource> MyOP;
        private DbDomainContext DC = new DbDomainContext();

        private void LoadData()
        {
            ResourcesDataPager.xEntity = new tblResource();
            ResourcesDataPager.xEntitySet = DC.tblResources;
            ResourcesDataPager.xIsBusy = true;
            MyOP = DC.Load(DC.GetTblResourcesQuery());
            MyOP.Completed += new EventHandler(MyOP_Completed);
        }

        void MyOP_Completed(object sender, EventArgs e)
        {
            ResourcesDataPager.xIsBusy = false;
            ResourcesDataPager.Source = DC.tblResources;
            ResourcesDataPager.xDomainContext = DC;
        }