How to add buttons to crm vanilla grid? - dynamics-crm

On vanilla entity product (Bundle type) I have a vanilla grid Bundle products, I need to add the 'open grid in a new tab' (to watch the all grid), I didn't find that option in grid's attributes, is it possible to add that button in this case?

That subgrid ribbon button will get added in the form automatically (next to subgrid “+” button) when you have added the navigation of that associated entity (Product) in parent entity form.
Read more
But when I tried this, it didn't work. Around Products there are lot of inline edit grid options and special grids available. This is one of them and you won't get that functionality in associated view or in other regular subgrids. That may be the reason that we are not getting that icon.

Related

How to prevent creating a new record from dashboard grid?

I have a dashboard that holds a few views (grids) I need to disable/hide the add + button from some grids, is there an option to controlling dashboard some of the grids will have the add + button and some will not?
Entity ribbon buttons can be customized for Main grid, Subgrid & Form. There are different (+) Add New buttons available from Main grid, Associated grid, Subgrid and Form. They can be customized/hide/delete from Ribbon workbench, or custom script action can also be applied to return boolean values for Enable/Display rules for hiding them.
Views in Dashboard does not have a separate Ribbon, they use either Main grid or subgrid ribbon only. When you hide it - it will be hidden from all the views in all the places, for example: wherever subgrid is embedded. So there is no special way to hide/remove only from Dashboard view.
If the dashboard is containing views from same entity - you cannot hide for some views & show from some. Also there is no form scripting for Dashboard to write custom javascript, even if we write some script in Dashboard ribbon button, they cannot access the components in any supported way.

Custom drop-down as an item in a kendo tree

I am trying to create an item that is a button "show more" and when you press on it you can show a kind of context menu / drop down that all of the items in that drop down are with checkboxes and there is a search component in it too, so you can search some items in the dropdown by their name. For example: (instead of "c++,c#,Object c" it's should show "show more", i.e. static text)
I tried to use kendoContextMenu. But I don't know if it's could work because the problem with context menu is that when I will click on a checkbox the menu will close. Please advise me of a way to do that or if you have an example of code. Thanks!
The MultiSelect component might be a good starting point
https://docs.telerik.com/kendo-ui/api/javascript/ui/multiselect.
My understanding is that MultiSelect does not have a "select more than one at a time in dropdown" feature.
You might consider using a pop up window and within that implement your own custom ui that features everything you want
search term box
scrolling list of selected and selectable items
accept or cancel changes in selection
Regarding your dojo that extends drop down list, I can't code the extension for you. However, changing the dataSource assignment to a setDataSource call will populate the extension component according to the template.
// kendo.ui.DropDownList.fn.dataSource = options.testItemSource;
me.setDataSource(options.testItemSource);

CRM - 2015 - CheckBoxes

IS this possible to have check boxes in crm 2015 page (not through web resource) , I tried to implement couples of solution with js but did not work out. Any comments would be useful.
You can add checkboxes by creating fields of type two options. Then, add them to an entity form and in the field properties window, change the format to "checkbox".
Check this out: https://www.microsoft.com/en-US/dynamics/crm-customer-center/create-or-edit-entity-fields.aspx
Possible data types for a field
Two options
After creating this field, configure it in the form to which it was added. In the form, select whether the field is displayed as option buttons (also known as radio buttons), a check box, or a list.
Cheers.
In the Dynamics CRM entity form editor:
Click New Field button on the extreme down-right corner
Provide Name to the field
Set data type as Two options
Save the record
Drag this newly added field into the form from the right side field list
Click Change Properties in the menu bar
In the pop-up click the Formatting tab
Select Two radio buttons / Check box / List in the Control formatting section
Click OK

jqGrid NavBar custom HTML

I need help with jQuery jqGrid and subgrid.
I am able to create a Subgrid inside my jqGrid succesfully. The next step is to add a custom option list in the main grid navbar somewhere so that depending on which option the user selects, a different kind of subgrid opens.
Is it possible to add custom options to the jqGrid navigation bar?
The only standard way to add custom element in the navBar is to use navButtonAdd method which add a button.
If you want to add another custom HTML elements you have to do this manually with respect of some jQuery function like jQuery.append. I recommend you to read the code of navSeparatorAdd and navButtonAdd functions.

jqGrid using radio buttons for editable rows

I'm currently using jqGrid and ASP.Net MVC. With my current project, my goal is to provide a grid of data to the end user, and they can then edit this. The data is machine-generated, and the users will be confirming if the machine is correct or not.
I think ideally for speed, I'd like to provide a row per item, with a radio button group as the editable. The users could then pick from the values 'Unknown', 'Correct', 'Incorrect'.
As there will be a lot of data, I'd also like to provide a control of some type that can set all rows in the grid to one of the available radio button choices, for the user experience.
Given that there seems to be no native support for this in jqGrid, I wanted to ask if anyone has had any experience writing something like this, and whether this is achievable and reliable, or whether I should stick with the drop-down editable approach that is native to jqGrid.
To implement radio button as the editable instead of the standard drop-down editable approach you can use so named custom editing feature of jqGrid (see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:common_rules#custom). This allows you to create any custom control to edit the cell value. An example of the implementation you can find here: Add multiple input elements in a custom edit type field.
To set all rows in the grid to one of the available radio button choices you can use either a control outside of jqGrid or add an additional custom button in the navigation bar (see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:custom_buttons). If you search for navButtonAdd you will find a lot of examples how to implement this, for example, Jqgrid: navigation based on the selected row. Because you use server based data, you can just call a method on the server to make the changes which you need and then call trigger("reloadGrid") to refresh jqGrid data.

Resources