Need to disable the button present in the bottom of jqGrid dynamically - jqgrid

Currently, I am working on asp.net mvc2 project which has a view containing three dropdown controls. I am also using jqGrid for displaying the data in the application. The jQGrid is displayed with buttons called Add,Edit,Search in the footer section. I need to disable and enable the Search button dynamically. If the user selects any item from dropdown1 and dropdown2 then I need to disable the Search button and in case the user selects any item from dropdown3 then I need to enable the Search button.
I am new to jQGrid implementation. Can anyone help me with some sample code to handle the above functionality.
Thanks & Regards,
Santosh Kumar Patro

I would recommend you to read the answer and another one. The answers shows how one can hide/show or enable/disable buttons from the navigator bar. You can use onSelectRow or beforeSelectRow callback to disable/enable/hide/show the navigator buttons dynamically.

Related

Buttons in a view in Dynamics 365

I am new with Dynamics 365 and are not sure of how I can achieve this.
I am looking into having some buttons in a view.
Maybe a view isn't the best way of doing it, but what I want to do is to have a list of records connected to the logged in user (similar to a view)
But on each row/record I want to have multiple buttons. These buttons can be like 'Complete' (Changes status on task and updates the view) , 'Send email'(Starts a workflow) and so on.
What are some of the ways of doing this? Either with Javascript/C#/plugin or something else.
You cannot add buttons in views/subgrids directly.
That’s when we add ribbon/command bar buttons using Ribbon workbench usually.
Create a Workflow Short Cut Ribbon Button (No Code Solution!)
Update:
There is a PowerApps Components Framework (PCF - preview) coming out soon, then we can build custom grid control with the layout/buttons we want.
This can be achieved with RibbonWorkbench. My answer does not differ much with #arun vinoth answer but just added few explanation lines.
https://ribbonworkbench.uservoice.com/knowledgebase/articles/132235-create-a-workflow-short-cut-ribbon-button-no-code
If you look at view below where I have selected number of contact and then I have a Button at top "Nominieren" which is shown and clicking on it will perform whatever action is needed.
There will be java-script on click of button, from Java script you could call Action or workflow or perform operation in Java script itself.
Link for Adding new Button : https://community.dynamics.com/crm/b/crmtipsfromadeveloper/archive/2017/07/26/know-how-add-a-ribbon-button-using-ribbon-workbench
Now when you look at image below I have no contact selected and it does not show button on Ribbon.
It might be possible. I haven't tried this but you can write JavaScript for a view column now (since CRM 2016).
If you go to a view you can double click on a view column to view its properties. There are two properties you might be interested in:
Web Resource
Function
Here's a link to an MS page that explains how to use these options to add an icon. It might be possible to create a clickable button which uses CRM's WebApi to perform some actions: Docs # Microsoft

How to bind the event Kendo grid PopUp mode?

My requirement i want to do the calculation in Kendo Grid While Clicking the Add New Record or Edit in Popup mode. Currently i am not able to catch the Kendo Grid Popup event.
But i can able to catch the event outside using html on chaning event. It's working but i need to add the this functionality in inside grid like how we are binding event/methode to save, remove ,cancel.
I tried using change event but it is working inline of the grid but it's not working in popup mode. Please look at my Dojo link. http://dojo.telerik.com/AtebI/10
Acutally i am generating grid on the fly(dynamically). So i have to bind the event before Creating/rendering.
Anyone help me to achieve.
DataGrid edit event is fired when user opens row edit on popup editor and also when creating new row.
http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#events-edit

Open Partial View on click of Edit button of Kendo Grid

My grid has a FileUpload control in it. After successful upload of the file, I am displaying imported records.
On Edit button click I need to display a PartialView. There will be so many add edit functionality on that partial grid. On close of PartialView, main grid should refresh.
Please let me know how do we call PartialView from Kindo grid on click of edit button.
Take a look at this example blog post from Kendo. This will let you use custom popup editor for your grid. You can override the events for what to happen when this custom pop up is closed.
Also look at this excellent article by Brad Wilson about custom templates in asp.net mvc.
If it still do not meet your needs please elaborate your question and add some code.

jqGrid context menu disable items

I'm using the context menu plugin for jqgrid. I know how to remove a menu item if not needed (ContextMenu plugin - Example 3).
Is there a way to show the menu item but to disable the action? Like in every other program if an action is not available in a specific context?
Thanks for your anwsers in advance. :-)
Peter

jqGrid: Search Box: How to hide the search popup programmatically

I'm using the jqGrid plugin along with its 'advanced search' feature. Is there a way to programmatically show/hide the search popup? I'd like to hide the popup, if it's currently being displayed, based upon a user action elsewhere on the screen.
If you have a jqGrid with id="list" then the "Advanced Search" dialog will have id="fbox_list"
(it will be build from the "fbox_" prefix and the grid's id). So, to hide the dialog it should be enough to use:
$("#fbox_list").hide();

Resources