Remove Column From Grid Menu in UI Grid - angular-ui-grid

I have two columns that I have its visibility to false. They are called $$TreeLevel and Instrument. I want to keep them hidden at all times so I am trying to remove them from the Grid Menu hamburger drop down. Is there a way to do this?
Thanks

Please use custom menu feature of UI grid, http://ui-grid.info/docs/#/tutorial/303_customizing_column_menu

Angular JS provides option to add custom fields to the UI Grid Menu. The 2 ways to do that are
1) gridCustomMenu function -> Used within the onRegisterApi function of the UI Grid.
2) Functions call present in the gridApi.core feature
gridApi.core has 2 primary functions -
a) gridApi.core.addToGridMenu(grid,items), where items is an array which comprises of a JSON object with certain properties that you want to add.
Ex - gridApi.core.addToGridMenu(grid, [{title: 'ABC', order: 10}]);
b) gridApi.core.removeFromGridMenu() -> I think you need to make use of this function to remove your custom entries from the UI Grid Dropdown!

Related

Vaadin14 Custom Grid Drag and Drop

I have a TreeGrid with a hierarchy and I want to add a Drag and Drop functionality to it.
My problem is, I only want two types of elements to be draggable, and they can only be dropped on into these two types and the root element.
So far I could manage to only allow these elements to be dragged, by returning the dragStartEvent when the element is a different type of element.
But how can I customize the allowed dropTargets when it is a Grid?
Right now the user can drop the element at any other grid element, and the only thing I can do is show an errormessage if the dropTarget is not the desired type, but this is not a good solution, they should see while dragging the item that its not droppable there.
The grid has a Drag and a Drop Filter that you can use to decide if drag or drop.
void setDragFilter(SerializablePredicate<T> dragFilter)
Sets the drag filter for this drag source.
void setDropFilter(SerializablePredicate<T> dropFilter)
Sets the drop filter for this drag target.
Please checkout the documentation https://vaadin.com/components/vaadin-grid/java-examples/drag-and-drop

Saving data to different tables from a single form in Dynamics AX

How can we allow a Dynamics AX form to allow saving data on the grid to two independent tables:
When I click on +New it always adds the row to the first grid. We are looking for a way to add row independently for each grid on this form.
Your +New button is most likely a command button and has a single associated DataSource or inherited DataSource. So when you click +New, it can only do the single one.
See: https://learn.microsoft.com/en-us/dynamicsax-2012/developer/action-pane-button-overview
So you need to write some code or add a second Command Button with a different DataSource if you want the button to do two new records at the same time.

How to dynamically change a function based on tab and cell in Google Sheets for drops downs

So I can create the dynamic drops downs using IF and Query in Google Sheets and this works great on one sheet. However, I need this to work over multiple sheets. Basically I need to be able to have the drop down menu in multiple cells on multiple tabs. This is the function I use to create the drop down menus:
=IF(Template!H1="6",FILTER(Sheet4!A:A,Sheet4!B:B=Template!G7),Query(Sheet4!A2:C500,"select B where A contains '"&Template!H1&"'"))
Template is one tab where people will find the drop down menus (from data validation pointing to the Sheet4 tab that holds this formula)
The problem is that the variables with Template in them are fixed to that one tab. I need to be able to have this drop down on multiple tabs.
Is there a way to call the tab you are on dynamically? If I have a Template2 tab I want it to be able to pull the lists from Sheet4 using the same type of filtering I am using for Template.

Ui-grid: how can I create multiple ui grids dynamically

I need to display multiple ui grids in my screen. The number of grids are dynamic.
Scenario: I am adding some people in a list and proceeds to next screen where I need to display their details in a separate ui grid. How can I create grid options dynamically?
Wrap up the code and html inside a directive, pass the table data to the directive.See the answer from user CMR here...I hope this helps.
Custom directive for Ui Grid

Drag & Sort using Kendo UI

I want to implement similar functionality to the jQuery UI Draggable & Sortable, but using Kendo UI.
This should allow me to drag from a list of options and place them within a sortable list.
Here is the jQuery UI functionality: http://jqueryui.com/draggable/#sortable
I want 2 panels, one with items that can be dragged and the other containing the dragged items. The closest thing I could find on Kendo UI is: http://demos.telerik.com/kendo-ui/sortable/linkedlists, but the items in the first list (on the left) are sortable and this moves the item from the first list.
I have looked at all of the Kendo UI samples on Teleriks website, but I cannot see any examples of how to do this.
Update:
I am now part way there. I have 2 sortable lists and I have added code to stop the 'draggable' items from sortable. However, when I drag an item to the 'sortable' list, it disappears from the 'draggable' list.
Here's the code I'm using to stop the items being sortable:
start: function() {
$("#draggable li").each(function() {
$(this).removeClass("sortable");
});
Here is the fiddle: http://jsfiddle.net/kgjertsen/r4xmLevq/
Anyone able to tell me how to stop the items from disappearing?
After a lot of investigation, it turns out that you cannot link draggable with sortable, as you can with jQuery. You need to drop the item into the container, then sort it from its default place, which is at the bottom.
Telerik justify this with a statement saying that they cannot implement this behaviour as the controls cannot know about each other, as this is bad practice.
Personally, I think this is terrible and the functionality would be a great addition to the Kendo UI library.

Resources