Using a checkbox to filter a Boolean on table view. Inherited (relation) datasource - google-app-maker

How can I bind a checkbox to filter a query in a table view? The datasource contains the field "active" and it is an inherited (relation) to the pages main datasource. I could create another datasource that filters on a parameter that is bound to the checkbox but this returns all results in the table do to losing the inherited (relation). Is there a better way to do this? I'd like to keep the inherited relation if possible.

Related

Datagrid markChanged X++ (AX Dynamics 2012)

In a form there's datasource, the datasource content is a table. this table is the datasource of a grid. then I have markChange override method on the table to do business logic when I'm selecting record/s on the grid.
Now the question is, if my form datasource is a Query how could I do the markChange event?
If you add a query to your datasources node of your form it should expand with all the tables in the query.
On the first table you can just override the markChanged method and it will be triggered when you select a record using the checkbox.
The markChanged is triggered on the first table though, not on the others.

Add ComboBox field in GridView control, Dynamics AX

I want to add ComboBox type control in GridView, how is it possible just like that?
You add an enum control to the grid control (not GridView). Also adding a string field with relation to a table (a foreign key) will give a lookup which is similar to combobox.
A good starting point is reading about form controls.

EntityDataSource filtered by Selectedrow of a Gridview

If I have 2 entities that share a navigation property (In my case an entity called Groups and one called Requirements) and I have a Gridview that displays Groups and another Gridview that I want to display the Requirements in the navigation property of the selected Group, should I pull in all the Requirements in the Requirements DataSource and then filter in the Gridview or should I filter in the DataSource?
I tried filtering in the Requirements DataSource by doing some Linq in the OnQueryCreated event, but I realized that OnQueryCreated is called when the page is loaded and then not again. Is there another event I should use?
Basically: Should I filter in the DataSource and if so where? If I should filter somewhere else, where?

Displaying a gridview's footer with an empty (linqdatasource) datasource

The datasource of the datagrid is a LINQDataSource which relies on the value of a dropdownlist. In addition, I want to use the footer to insert new records - so I'd prefer not to use the empty dataset template. I am trying to find a way to always display the footer regardless if the datasource is empty or not.
EDIT:
Is there a way to create an empty/invisible object of the type in the LinqDataSource?
check the following article:
http://weblogs.asp.net/joewrobel/archive/2008/01/30/a-more-elegant-solution-to-display-gridview-header-and-footer-when-the-data-source-is-empty.aspx

ASP.NET - ObjectDataSource: using multi-select ListBox as ControlParameter

I have a form that contains a GridView control which is databound to an ObjectDataSource Control. There are several TextBox controls that are already being used as ControlParameters for the ObjectDataSource. I also have a custom data object that the ObjectDataSource is associated with {TypeName="myDataClass"}. The values are passed from the ObjectDataSource to myDataClass.
Now I need to also use a multi-select ListBox as a ControlParameter. When I use the SelectedValue parameter of the ListBox, the ObjectDataSource is only seeing the first selected item in the list.
Here's the question: How can I get all the multi-select ListBox values passed into my custom object "myDataClass" instead of just the first one selected? Hence the ["multi-select"]
Thanks for any help!
Multi-select list boxes are tricky. You need to loop through the items in code to build a list of selected values. So you will probably need to implement a custom parameter that does this for you.
You might end up needing to bind to the grid from code-behind, instead of doing it declaratively.
This is typical problem. multi-select list box always return the first selected value and not all the selected value. We have to loop through the entire collection and check each individual value if selected or not.

Resources