Giter VIP home page Giter VIP logo

datagridcolumnsearch's Introduction

Datagrid Column Search

Description

This Mendix widget adds interactive in-column searching to the Mendix data grid. Filters work in an "AND" configuration, just like Excel.

Also, for the first time, you can search within data grids that are sourced via microflow or association!

Not Searching

Searching

Contributing

For more information on contributing to this repository visit Contributing to a GitHub repository!

Configuration

To use this widget, simply drop it on a page with a data grid and set 2 properties:

  • Grid Name: the "name" property of the data grid you want to have search fields
  • Grid Entity: the entity show in the data grid

Supported Data Types

The following data types are supported:

  • String
  • Integer
  • Long
  • Date (localized and non-localized)
  • Enumeration
  • Boolean
  • AutoNumber

Supported Mendix versions and browsers

Testing was completed in Mendix 5.21.4 and Mendix 6.10.3, on Chrome, IE, Firefox, and Edge.

Limitations

This widget has not been tested against the newest data source for the data grid: Database. It does support the following data sources:

  • Microflow
  • Association
  • XPath (previously labeled "Database" in Mendix 5)

datagridcolumnsearch's People

Contributors

djkwagala avatar tieniber avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

datagridcolumnsearch's Issues

Date filtering not working on Mendix 7.23

Date search is not working properly when entity localization is NO .
Suppose I have Entity Student with birthdate attribute of type Date and Time and localization is not enabled. Now consider one student has birthdate 31-08-2020. When I search for 31-08-2020, I do not find above student but when I search 30-08-2020, I can find this student.

I see this issue is fixed when I pass localized attribute value as true in searchObj object of _addDateSearchBox function . I have tested it for both attribute types(localized and non localized) and it seems to be working fine. But I am not sure if this is correct fix.

Mendix version: 7.23.3

data list disappears on page load

so this was working great.. and then suddenly and now consistently when i'm using this widget, everything briefly appears like normal, then all of the data disappears. back/forward paging buttons widget shows like 1-20 of 36 or whatever, but there is no data shown. DGCS widget filter controls are there but don't seem to do anything to reappear any portion of the list. this is versus a microflow that returns a list of entities with several enum attribs. i verified that the microflow was returning many entities.

thank you for any assistance.

DGCSwidget issue

Mobile compatibility

The widget appears not to be working on mobile devices. Tested it on Android and Apple mobile devices, but it did not work in all the test setups.

Only way to make it work is to load the desktop version, in browser that support this option.

Could not create widget

Mendix runtime showed "Could not create widget DataGridColumnSearch.widget.DataGridColumnSearch" on page.

No error message shown in console. Modeler version 7.23.3.

Predefined Filters

Hey,

Quick idea--not sure if it makes sense at part of this widget or as a separate one--but it would be cool if we could add "toggles" for pre-defined filters to a data-grid. I.e. instead of having separate xpath grids on different tabs (for "My things" and "All things", for example) we could have buttons for All and Mine that would apply an xpath constraint using datasource.setConstraints(/* some xpath */); maybe where the xpath is defined in the modeler?

Thoughts? It would save us from having to duplicate data grids when we want different filters of the data

Data Disappears

Hi Tieniber,
I call a datasource by a microflow.
i have added the widget below grid.
when a grid is called 1st time i get all data..
but when a grid is called 2nd time data comes and disappears.
do we have a work around or something for this ?

Lazy load

When using the widget in grids on tabpages, all the data is loaded when opening this page, this will make it very slow. The standard functionality of mendix is to load the data of the tabpage when opening the tab.

This 'Lazy loading' functionality would be a great adjustement to the widget.

Mx 7.5.x compatibility

Eric,
Will you be able to update this widget to work with the latest versions of Mendix? I am getting ready to upgrade and app and figuring out if I will need to remove this widget.
Thanks,
Mike

Enum not found causes javascript to throw error.

When fields are not found, the return of empty values is not checked for valid returns. I.e. in _addEnumSearchBox ()

the following code is used:
if (mx.meta) {
enumMap = mx.meta.getEntity(columnEntity).getEnumMap(columnAttribute); //used in 6.10.3
} else {
enumMap = mx.metadata.getEntity(columnEntity).getEnumMap(columnAttribute); //used in 5.20
}

I am using 6.5.1 modeler and from testing mx.meta is used, however the enum is not found and returns null.
However, the code does not check for null values and as a result the script hangs.

I added the following after the code above, which workes around the issue (by not placing a search box) but the real issue obviously is that the enum is not found in 651

		if (!enumMap)
		{
			return;
		}

Think in general it is a good idea to check return values if used further down the code.

Widget is not working in Mx 8.17

Implementation in Mx 8.17.0.11170 unfortunately gives error "Could not create widget DataGridColumnSearch.widget.DataGridColumnSearch".

Using Widget in Tab set to Refresh

When I have the widget in a tab that is set to refresh, each time I click on the tab (without refreshing the page), the widget duplicates itself. See screenshot:
image
In thinking about it, I don't really need to have that tab set to refresh since it is a dynamic search, but wanted to raise the issue.

Booleans shown in English

When searching on a boolean value, the selectable options are in English (Yes/No). It would be nice if the selectable options would be based on the users' language as defined in his/hers account.

Can not search on attributes of associated entities

Searching in a DataGrid with columns which are populated over association does not work. Problem lies in the fact that it fires a 'contain' on the id in the association table instead of in the table of the actual associated entity. Error: 'java.lang.IllegalArgumentException: Global identifier should be a number'.

Losing value from filter

Hi,

Scenario:

  • User put some value in filter.
  • number of results is bigger then one page of datagrid
  • user jumps to next page of results in datagrid
  • next page shows all results and don't use value from filter

It's possible to fix that?

ps. Great work, great widget! Definetly should be not extension but standard functionality in Mendix.
regards

Widget is not working in Mx9

I added the widget to a Mx9 project, but is does not work. The searchfields are shown correctly in the browser, but it does not execute a search when I enter a search string.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.