ListGrid column change event - smartclient

I have requirement to create a custom ListGrid, where user can show, hide, filter a column. also can change width and reOrder column and even color it and sort direction.
I know that list grid provide all this facility to user.
But I have to save all these changes and user will get this things back when they login again.
Is there any event which record all changes??
And how to get all this data from listGrid??
​Thank you.

You could use ListGrid.viewStateChanged():
Notification method executed whenever the viewState of this grid
changes. View state is accessible via ListGrid.getViewState(), and
contains field state information, sort information, selection
information, hiliting information and grouping information.

Related

Allowing User to Select off of Partial Records in a Continuous Form in Access

I am creating a form in access to allow users to input multiple production records for a day.
The form is set as a continuous data entry form and has data validation in place to ensure the information being entered is consistent.
I am having a problem where if a user starts typing something on a new entry, they essentially have no way to back out of it or cancel the entry without completely filling out the form.
I want to keep the data validation to ensure the data being recorded is accurate, but also do not want to lock users into an entry unless it is completely filled out.
I think the ideal would be to allow users to create a new record or select other records without needing to save the current record.
If it would be possible to make it so records only save when a button at the top of the form is pressed I think that would be ideal, but I have not found a good way to do this without requiring it on every single entry.
I have attached a picture of what I am talking about, there could be various error messages but essentially if you try to click off when a record is incomplete it will give an error until the entire form is filled out.
Example of Error Message and Image of Continuous Form
'deselect' without saving but still save what had been entered up to
that point.
That you can simulate by setting the DefaultValue of each control in the AfterUpdate event of each control:
Me!SomeTextBox.DefaultValue = Nz(Me!SomeTextBox.Value)
However, I'm not sure that will be a good idea. And you may have to reset the default values when opening the form.

How Do I Expand A Cell in MUI-Datatables to display additional content?

I want a user to be able to click a row in the MUI-Datatable, so they can see additional content. The current renderExpandableRow function has the right styling, but I don't want a new row. I want the cell in the first column to show additional data. Is there a way to do this?
Note: I'm also going to need buttons that will expand all/collapse all, so I need a solution flexible enough to do that.
I found a solution to my question.
I made the first column's content a Button using customBodyRender. The column with expandable content became the second column. This column has a customBodyRender with a Collapse component. I store in my component's state all ids of my data objects and whether or not they are expanded. When the Button is clicked, my component's state is updated, which in turn changes whether or not the Collapse component is open.
I also used customToolbar in the table options to generate an expand all/collapse all button, which just sets the state of all rows to expanded/collapsed.

Displaying a field in a column with a fallback option to another field

I'm creating a view for Contact entity and the issue is that some of their sellers have entered information on Mobile Phone field, while others used Business Phone field.
They'll probably continues to do so. There's no point copying the values as they're entered and both fields are needed.
The simplest solution is to display two columns in the view. However, that occupies the precious width on the form.
I wonder if it's possible to display a column in a view so that it gets its information from field Ahaa and if that happens to be empty, it falls back to displaying the field Buhu. Is it possible and if so - how?
There's no supported way to add conditional logic to a view definition such that it would show or hide columns. The usual way to do this is to store the value of whichever field is populated in third field. Populate this in a plugin and show this only in the view.

Setting up recycle bin functionality in Archer GRC

When deleting records within the platform, this action is not reversible via the front end. Is there a way to allow users to remove a record from their view without actually deleting the record?
You can simulate recycle bin functionality within Archer GRC by adding a record permission field that grants read access to "Everyone". If read access is no longer required then an editor of the record can go in and change "Everyone" to a group called "Recycle Bin."
Please note that if there are other record permission fields in the application, users or groups may still have access if they are selected in those fields. Perhaps You can set up a dropdown status field for the user to select "Recycle Bin" and use this condition for automatic record permissions to revoke permission to the record depending on the requirements or workflow of the application.
Solution shared by Igritte might be somewhat confusing for end users.
End user will see greyed out "Delete" button in the top toolbar, but he has to select "Recycle Bin" in the form. This solution was not accepted by my business owner at some point.
As a work around for "Soft delete", I wrote a custom object overriding "Delete" button functionality.
1. User doesn't have delete access to the record, so JavaScript code will make "Delete" button look like active and available.
2. Once the button is clicked, custom object will populate value in the
hidden value list and simulate the click on the "Save" button.
Update: Note that Custom object needs to hide the value list first once the page is loaded. Here you will need to use a JavaScript and do the following: [a] locate the value list DOM object and [b] set display attribute to none. I used jQuery library to do both. This way your value list is not displayed, but you still can use it to control data driven events.
3. With hidden value populated and submitted, record permission will hide this record from the end user.
Note that custom object hides one value list on the layout as well.
If for some reason JavaScript doesn't load properly, user simply will not be able to click on the grayed out "Delete" button.
Update: Hidden value list can be populated by custom object using JavaScript code as well. You need to identify the form tag "input" in HTML code of the page and set attribute "value" to the desired state. I used jQuery library to do this as well.
I have this solution in production working fine with IE11, FF and Chrome.
I can't share the code, but with WC3Schools JavaScript guides and 4 hours you can write and test it yourself with very little JavaScript skills.
Sometimes you have to use custom objects when you want to get a user-friendly solution of not available functionality.
Good luck!

How to bind data in controls and edit accordinly on dropdwonlist selectedindexchagned event in mvc4 razor using jquery?

I have a view for create/ edit data, in my view contains a dropdownlist control and two textboxes and two buttons [Create, Done Modifications], and my requirement is like below.
User should be able to select his/her name from dropdownlist which contains list user names. By default create button is visible and ‘Done Modifications’ button should be invisible.
Based on the dropdownlist item selection, if the record is already exists then show up his/ her data in DOB, Location textboxes then invisible Create button and able to update to the database by Done Modifications button.
Data population, edit, create, delete logic should be implement in Controller classes.
Above things should be happen in asynchronously, I don’t want to allow post backs on any events.
Thanks for your time!
Sridhar Goshika
What is the hourly rate you are going to pay for this?
This is a list of specifications given to you, that you pass on to us; It does not show any research, any code showing what you have done and where you are at. Moreover, there is no question there.
submit() method will submit the form by dropdownlist item selection
#Html.DropDownList("ProdID", null, new {#onchange="submit()" })