Hide field in grid edit but keep on list

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
crash
User
Posts: 158

Hide field in grid edit but keep on list

Post by crash »

I have hidden a field in grid edit and inline edit using client script, listpage, startup script $('[data-name="<fieldname>"]').hide();

This allows for the field still to be edited in the background.
I need to hide this field in the list page after edit

If I hide in gridedit/inline edit it also hide in list... i need it to show in the list.. is there a way around this ?

Thanks


MichaelG
User
Posts: 1123

Post by MichaelG »

Try the FieldVisibility extension (for registered users only), which allow you to hide field for grid edit but show for list.


crash
User
Posts: 158

Post by crash »

It’s doing the same thing. If I hide in grid edit / inline edit it also hides on list page. I’ve used 1 and 0 and “1” and “0”.

All this is in the extention showing as Bool
What am I doing wrong.


crash
User
Posts: 158

Post by crash »

Can anyone help with this problem? I'm using the field visibility extension

This the table option are set to bool... I use 1 and 0
I would expect the field to not be visible on one of those options,
I've tried same with userid and userlevel... it either hies it everywhere or shows it everywhere


crash
User
Posts: 158

Post by crash »

Has anyone else found this error with this extension, mine should work but no luck


darkdragon
User
Posts: 151

Post by darkdragon »

I made something somehow similar to you.
I used CurrentAction to determine if the List in GridEdit mode:

	if ((CurrentPageID() == "list" && CurrentAction == "gridedit") || (CurrentPageID() == "add") || (CurrentPageID() == "edit")) {

		Field1.Visible = false;
		Field2.Visible = false;
		...
		
	}

crash
User
Posts: 158

Post by crash »

This is great thanks, that worked

How would I include Inline Edit ?


darkdragon
User
Posts: 151

Post by darkdragon »

For Inline Edit, you need to figure it out how to intercept creation of the DOM elements and hide them out. (you need to create a setInterval function)
I dot no use Inline Editing at all, so I have no idea of any tips & tricks.


crash
User
Posts: 158

Post by crash »

For some reason this code is not working for me anymore, can anyone confirm where in server events and client scripts this must go. List Page, Page Load not working


MichaelG
User
Posts: 1123

Post by MichaelG »

Try Page_Render


crash
User
Posts: 158

Post by crash »

Thanks that's working but now my autofill does not work anymore for the non-visible item.
Any advice please ?


MichaelG
User
Posts: 1123

Post by MichaelG »

Make sure that you do not hide any of the auto fill parent fields.


Post Reply