How to set SubGrid data binding conditional? - kendo-ui

I've followed the demo to setup the master/detail grids (or hierarchy grids), they works fine as intended.
However I'd like to make improvement by asking how to make SubGrid data binding conditional.
By default if the MasterGrid returned 10 rows, then the data binding to the SubGrid, which is the url to Controller/Action, were called 10 times, with each one pass in the different ID from MasterGrid.
In my case I only need to call the data bind to SubGrid when a value in MasterGrid has met the requirement.
i.e. for each row of MasterGrid returned, only if the column MyFlag=1, then I need to call the SubGrid.
So out of 10 rows turned, if only 3 rows has MyFlag=1, then the data call to SubGrid only need to be 3 times, instead of 10.
I am not sure how to do that, please advise.
Thank you,

The SubGrid should only be accessed when you expand MasterGrid so actually you should not have 10 accesses to the server.
If you want to control if a row in MasterGrid can be expanded, then you need to implement in the detailInit function of the MasterGrid the logic for deciding -depending on the content of the MasterGrid (MyFlag equals 1)- if the SubGrid has to be created or do just nothing.
What this approach does not prevent is having the expansion indicator (little triangle) from being shown.

Related

Adding a drop-down menu (data validation) after each row of a query result in Google Sheet

First, here is the link to my sheet:
https://docs.google.com/spreadsheets/d/1067N1SAIwpGkMRBZiUv4JW8yDNkozuGt7Fwh6GW-qvE/edit#gid=1742559851
If you look at the tab called "Selection", I have two columns called "Select". All the data in these tables is collected by a query function, except column "Select". In that column, I need to add Data Validation (a simple Yes or No). I want the Data Validation to be automatically added when a new row is created but the query function instead of having to add or remove it manually every time I make some changed. Data collected by the query function is using the two variables on top of the sheet (minimum rating and global buff).
Just to show the step to apply data validation to your whole column, see the following image. Under Cell Range, the image shows Selection!D5:D99, but this is actually set to Selection!D5:D999, it just is truncated due to the size of the text box.
Let us know if this is what you were looking for, or if I've misunderstood your issue.

How to show checkbox disabled for some rows in Vaadin Grid when using <vaadin-grid-selection-column>

My Polymer custom element has a Vaadin grid with say 10 rows.
It allows selection of rows using vaadin-grid-selection-column, which renders checkboxes bound to the selection state of the grid on every row.
I need to:
allow selection of say only 8 rows based on some condition.
disallow selection for the balance 2 rows (either not show the checkbox or show it as disabled).
I am not sure if
<vaadin-grid-selection-column auto-select></vaadin-grid-selection-column>
can be conditioned in any way to achieve the result.
I appreciate any suggestions..
You can generate your own checkboxes in a renderer function. Check similar issue and solution in How to hook data-grid events in parent lit-element component?

Xpages - CompositeData - Repeat Control

I have a repeat control, repeatControls = false, rendered = true, using both indexVar and var. Value is an array from a sessionScope variable, so if 4 values, 4 items are shown.
Printing Computed Fields isn't an issue
I added an Edit Box inside repeat and set it to bind data using compositeData.editField1
no Partial refreshes
Then there is a button which has to set the data of all rows of editable fields to a sessionScope variable,
if I just do
sessionScope.put("editField1", compositeData.editField1), I just get the value of the last row. how to add the values of the other rows of edtitable fields ? There are no bindings to Notes views or documents as they aren't needed. Thanks
If you have input fields, you need to bind them. Binding them to a scope is perfectly fine. In the same question Michael was pointing to is the link to a sample with add/remove row logic (just substract the part where it goes back to the field).
Excercise 23 has all you need.

Adding TextBox in FORM with AddNew Button

I am working in Oracle Apex .i want to add TextBox i-e Disease from AddNew Button because i have Multiple Entries for one TextBox.The entries will be selected from another table through POPUP LOV. Below is the picture.
I don't think I can explain it step by step here, but it sounds like you could make use of a Tabular Form in your case.
In a Tabular form, you can dynamically add-update-delete new rows with a button, and for each field you can have Popop LOVS or Comboboxes to select data from.
Here are a few things to note:
When you insert a Tabular Form in your page, you'll instantly get three processes; one for Automated Row Fetching and two for save-update operations. By default, these processes are triggered through a button. You might want to change that since you have other items to submit in your page.
In a tabular form, you define a SQL query and the resulting columns of that query becomes your fields. For each field, you can select whether you want it to be a Combobox, Popup LOV etc.
Since you want to use a single column "DISEASE" in your treatment table, you can use one of the list item types that support multiple values (generally separated by colons (:)) - for example, a Shuttle.

jquery ui binding to sortable recieve event when dealing with nested sortables

I have a need to sort columns and separately I need to be able to sort fields accross columns and would like to hook into the col sort finished so that I can save the new column position and then also hook into the field sort finished event so that I can save the new field position
There is a jsFiddle showing an example here (doesn't seem to work in IE, but thats a different story!). What this shows is that when a column is dragged no alert is shown and when a field is dragged between columns the field AND column alerts are shown.
I'm using 'receive' to avoid multiple calls, one for the source and one for the target.
Any help would be really appreciated. Thanks
You should use different events to hook into, sortupdate does what you want. Because you are nesting sortables it is also important to prevent event bubbling, this is what causes your double alert. Here's an updated fiddle
By the way, when dragging a field to another column the sortupdate handler is called twice because two columns changed.

Resources