question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Visibility of fields - edit and insert

See original GitHub issue

Hi,

I’m having trouble with dynamically showing fields when an item is selected for edit. I have the column initially hidden by default, using visible: false and then within the onEditing method I attempt to set the visible flag to true using the fieldOption method so a value can be set.

However this seems to interfere with the edit functions as it then no longer converts the row to edit mode.

Is there something I am missing or is this sort of behaviour not supported?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
maurorullicommented, Apr 14, 2017
0reactions
tabalinascommented, Apr 23, 2017

Yes, as @richraid21 described, grid re-renders on field option changes. Hidden fields for instance are not rendered, so to show them it requires to re-render the grid.

You can define a rowClick, thus that editItem is called after showing new field:

      rowClick: function(args) {
	 var item = $(args.event.target).closest("tr").data("JSGridItem");
      	 $('#jsGrid').jsGrid('fieldOption', 'MyColumn', 'visible', 'true');
         this.editItem(item);
      },

https://jsfiddle.net/owcxwahm/2/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Item's visibility in edit and insert form in UI for ASP.NET AJAX
I have a problem when i click on the edit or Insert command. I have everytime 5 fields (even if the GridTemplateColumn is...
Read more >
How do I hide field on edit/new record page and still display ...
Use Lightning record page for this purpose. And click on the field that you want to hide in new/edit form. and add filter...
Read more >
Hide/show fields in Insert and Edit | Blazor Forums - Syncfusion
Hi, I have a short question. How can I show/hide many fields when it is in INSERT mode or in EDIT mode (popup...
Read more >
Hide Read-Only fields on New/Edit Page Layouts
When making a field read only on the Page Layout there should be an additional option to hide that field from the New/Edit...
Read more >
DataGrid - How to show/hide certain fields in the Edit Form ...
Hi,. Take a look at the dxDataGrid - How to display a field in the edit form only in the insert mode ticket...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found