Is it possible to Hide Column in Editable grid view of D365? - dynamics-crm

I've tried doing it with exporting the solution and changes the XML code and then importing it again.
as you can see in the image two bars after 'Do You Want to' column. But when I open this grid in Unified client interface it is still visible.
like in this grid.if 'isAllowOverride' is True I want to make 'Do you want to' be editable. But 'isAllowOverride' has to be invisible from User end.

Not sure why you are editing the xml for such customization. But this can be easily configured in UI itself.
Go to the form editor, open the subgrid properties, check the view it’s configured to show, edit the view columns to remove the unwanted ones, save the view and set the subgrid with the correct edited view again (there’s a product bug which switch to the default Active view), save & publish the form. That’s it.
Update:
We cannot have two different layouts for Display mode vs Edit mode. That being said, you have to disable the editable grid columns based on conditions.

Related

MAUI Show/Hide controls based on mode New/Edit/View

I need an idea, please. I have a Details form which shows the fields of a model (about 10 fields in all). There are three modes in which I could show this view - in mode "Edit", in mode "New" (which, of course, is like an edit but without values), and in mode "View" (no changes allowed, just labels).
I could of course create three Details pages, one for each mode, and call them selectively, but I would like to have just one and pass the "DocumentMode" parameter to it. That View should bind to that mode and selectively show/hide controls, probably like "DocumentMode = VIEW => Show labels" or "DocumentMode = EDIT => Show Entry or Editor, show DatePicker, TimePicker, etc".
My question is this: How do I show/hide these groups of controls depending on the DocumentMode parameter ? Which would be the best way to do this ? I could probably bind the "IsVisible" property to my documentMode parameter, but I think that is a really ugly solution (and I assume that regardless of whether the controls are used or not in a specific mode, they will all be loaded anyway).
Thank you.
Alex
I think you can use a Listview or Collectionview to represent your data because you mentioned that you have 10 fields.
In addition, you said you need a "new" button, so you can set it at the top of the app as a button, when you click the button then you jump to another page which is blank and you can add the data.
This must refer to the shell you may need to set a navigation.
Then the "view" and the "edit" you can use the property SelectionChanged to control the item, I mean when you click the item in collectionview, the SelectionChanged method can be triggered and turn to another page which can show the detail about the item you clicked. In the page you can view and edit the data.
Here are some articles you might be able to use: Listview, Collectionview, Shell
If you have more information to add, please kindly share with me.

Add buttons to sub-grid view

On the order form, there is a products section that has uses the default Order Product Inline Edit View. This view is not editable, but you can copy it and save it as a different name.
However, when you copy the view, the new view does not display all of the same buttons when viewing the sub-grid.
default view:
copied view (the lock pricing, move up and move down buttons are missing):
The copied view shows the + button and it's drop down menu correctly. Why hasn't it copied the other buttons, and how can i get them to show on my custom view?
I am happy to edit xml and upload that back to CRM if necessary.
Update:
FYI, this is all a pointless effort as the word template ignores the sequence order. What an utter waste of time.
I'm going to guess it's because the default view on the order of order products is a special one. It has special behaviours that arn't seen in the rest of 365, i.e. you don't get up, down, or lock on other views.
I would assume that the extra buttons only get shown on that default view and arn't really supported outside of that view.
Turns out it is actually quite easy to show these buttons for other views using the ribbon workbench.
Right click on the button in ribbon workbench under the subgrid section and click on customise
Select the command in the "solution elements" pane at the bottom
In the bottom right hand pane, right click on the enable rule "Mscrm.IsInlineEditView" and click "Remove from Command"
Publish
These buttons now show up for all views.

Export Dropdown Selection in Kendo Editor to Word Document

I've been trying to get a selected dropdown option to appear in a Word Document on export.
The current default behavior is that all option tags appear in the exported document with no indication of which was selected. (This makes sense that this behavior would occur since the export function is simply exporting all the html as plain text).
So far, these are the approaches I've tried (none of which work):
-Capture the export event before it is sent to the controller via the javascript execute event (thus being able to strip out any unwanted text). The issue is the execute event and exportas event are asynchronous, so I can't modify the file before the export event call is executed.
-Modify the text on the controller side before it is converted to a Word document and downloaded (the text is sent through without special characters, which makes it nearly impossible to parse)
-Attempt to replace the dropdown with a kendo autocomplete widget (this would also be an acceptable solution). The widget does not render properly inside the document. All of the datasource options are there and even filters corretly, but it does not style correctly or open.
Has anyone else been able to find a solution to this problem or have another approach I could use?
EDIT:
As per requested, here is a screenshot of the base code:
My initial idea on how you could accomplish this:
1. Pull that select list out of your editor.
2. Bind an event handler to the change event of your list to add the value of your list into the editor. Are you using JQuery in your project? It's a dependency for Kendo so this ought to work:
$("#selectListId").on("change", function () {
$("#editor").val( $("#selectListId").val());
});
In reality though I'm guessing this approach will be used to populate some template of text with values selected by the user? In that case, you may want to save the template first before applying the value selected.
Now that you've identified you need that dropdown menu to be usable on the exported word document, attempt the following:
Create a new word document.
In that word document, open the Developer tab. (If you don't know about it, google how to enable it)
Insert a new Dropdown Menu Content Control using the Developer tab.
Select this content control, then open Properties menu item on Developer tab.
Update the content control with your values:
Save this word document.
Use the Kendo Editor Import to import this document containing your template.
Attempt exporting what was just imported.
If that works and the editor has editable dropdowns from that content control, I will be very surprised... Good luck!

Kendo UI grid - different templates for Edit and Create

We are using Kendo UI grid to display some records. The requirements need us to have a column (Say "File Name")shown as a text box when the user clicks on "Edit".
However, when user clicks on the "Create" button in the toolbar, the same column should be replaced with a File Select control which will allow the user to select a file from his machine. The other columns remain the same.
I have already tried searching through Stack Overflow as well as the Kendo UI Grid forums, but to no avail.
Is there any way to achieve this? Any pointers will be of great help.
Regards,
Nikhil
Using different editor templates for create/edit is not supported. You need to use the edit event of the Grid to change that text input to file input with JavaScript. To distinguish between edit and create you can use the isNew() method of the model.
i.e.
edit:function(e){
if(e.model.isNew()){
//replacement logic
}
}
Similar question is covered here.

jgGrid Search Dropdown Not Changing

This may be a followup to this question Possible to make jqGrid Search Box Stay on Page? - Or it may be unrelated because clicking the search button manually shows the same behavior.
We have a dynamically generated grid that is created by a) making an ajax request to get the grid columns based on a report id and then b) setting up the grid model and fetching the data. When the page loads initially, we pass in a starting report id, but there is a dropdown box on the page that lets the user change reports.
When the dropdown changes, I unload any existing grid, make the ajax request to get the columns, set up the grid model, and then get the data. The columns change, the data changes, and everything looks correct - except the search columns do not change in the search dropdown.
If I close the search box and reopen it, it still has the old search columns. Likewise, if I click the reset button or reload the entire grid.
I found it after a bit more poking around. I needed to set the recreateFilter option to true
prmSearch = {recreateFilter:true,multipleSearch:true,overlay:false,sopt:['cn','eq','ne','lt','le','gt','ge','in','ni','nc']};

Resources