Kendo-ui MVC PopUp editor: How to hide fields - asp.net-mvc-4

I'm using Kendo ASP.NET MVC and I would like to have some control over the edit form.
Things I would like to do:
Hide my ID field
Change my Property Code and Square Feet to regular TextBoxFor fields
Change Date of Purchase and Date of Sale to Kendo DatePickerFor instead of the DateTimePickerFor that is showing.
Link to screenshot of editor form

When you click edit, Kendo uses the default EditorTemplate for the object. If you're not familiar how editor templates work, check this article.
You have two ways of solving it, either by creating a custom view editor templates that only lists the fields you want. Or (and this is simpler and preferred method), in many cases you can get away with the default editor template and control which fields are rendered (and how) using metadata on the object. You can hide individual properties by tagging them with [ScaffoldColumn(false)] attribute. In terms of controlling the types of editors that show up, you can accomplish this by tagging your properties with [DataType(DataType.Date)] or [DataType(DataType.Text)]

Related

How do i manipulate the data templates inside listbox in uwp

I am making a chat application using XAML in UWP.The side panel is consisting of users. like this.
Everything is in Listbox in which I have this template that consists one ellipse as a circle which is like an indicator,one user image,textblocks and one toggle switch.I have to give states to the toggle switch in on the state it should change the green color of circle and make it red.
I want to give this functionality in code c# in MainPage.cs. I made the object of toggle in toggled Event Handler but I am not able to access the other elements inside the data template like ellispse,textblock.
What is the other alternative way of doing this?
NOTE: It has to be in listbox because I want to use the same template for every user.
The best way to do this would be to use data binding.
You would define a ViewModel class for the item, which would contain a bool property and would react to the toggling of the switch in the setter or have a Command which you would execute when the state event changes using behaviors.
If you really want the code as a event handler on main page, you have some options. To get the item associated with the toggle, you can use its DataContext property and cast it to the data type you are using. Alternatively, you can use Visual Tree Extesnions provided by the UWP Community Toolkit. This enables you to find the parent (probably Grid) where you store all the item controls and then manually find the user image, TextBlock, etc.

Inline Editable Grid - Fields Not Editable CRM 2013

Inline editable grid is only working with default crm forms in crm 2013.The fields are editable.But if I create a custom view in subgrid it is not editable.
even the custom view in custom form is also not editable in the default form neither the default view is editable in custom form.Can anyone give solution?How to add a grid with editable fields in CRM forms
Inline Editable Grids in CRM 2013 are limited in their scope to specific views set up for this. You can't add new views that do this or do it on custom entities. Other people have already asked about this:
https://social.microsoft.com/Forums/en-US/10b1898b-32dd-44a9-bb65-34ac190f344e/inline-editing-of-subgrid-in-opportunity-in-crm-2013?forum=crmdevelopment
If this doesn't cut it for you, look into 3rd party alternatives, there are plenty out there. AbleBridge is probably the most visible solution (although I haven't tried their Inline grid solutions).
http://www.ablebridge.com/add-on-solutions/editable-crm-grid/

Custom Control with Multiple ContentPresenters

I am trying to implement a custom control which will show different content according to 3 different control states. I've achieved this by adding a state, and 3 different content properties to my control.
What I have now is something like that.
User sets CurrentState property to one of, "Default", "CurrentStep" or "Completed".
Control switches to a different visual state via VisualStateManager.
Controls default template sets Visibility property on 3 different ContentPresenters to display single content.
It's all working with no problem. What I am struggling to do is enabling design time support. The only thing I can do is to set ContentProperty attribute to one of the content properties, so that Blend shows this property as a child in it's control tree. However this enables only one content property to be editable in design time.
What more can I do to add design time support to my control?
I would not have created a custom control with multiple contentPresenter.
To achieve what you are trying to do, most of the time, you create a control with named parts (the default winrt control templates use this "named parts" mechanism).
When your custom control state changes, you simply show/hide one or more named parts.
This way your can provide a default control template, with all the named parts you require, and to customize the control, you override the default template, and define your own parts. The show/hide logic depending on the states will remain the same, but the target control choice is up to the guy writing the template.

Hiding Fields on Edit Form in Sharepoint 2010

I was wondering if there's a way to hide fields on the edit form on one view but have them display on another?
Right now I am using:
<FieldRef ID="{EF8477CA-D07E-4368-9359-5A33A9E0222C}" Name="Requester" ShowInNewForm="FALSE" ShowInEditForm="FALSE"/>
this in my contentType, but I'm pretty sure this will hide it throughout the whole site, is there a way to hide it just at specific points so it's still visible on some edit pages but not on others?
Thanks
I would recommend not hiding the Field in the Edit form, but define a custom form in your List Definition and hiding it from that one.
In the list definition scheema add this in your forms element:
<Form Type="EditForm"
Url="CustomNewForm.aspx"
SetupPath="pages\form.aspx"
WebPartZoneID="Main" />
After deploying the list, open the form generated and simply hide the containing the field using css display:none;
Finally, use the custom form where ever you need it.
This can help: Showing or hiding form fields based on membership in a SharePoint group

Hide few fields in EditForm.asx of Picture Library in sharepoint 2010

I have a picture library and added few fields to it. When i click add new item from picture library, the EditForm.aspx appears after uploading the picture. This form contains many fields of which I want to hide Title, Date Picture Taken, Description, and Keyword. In short the EditForm should contain only Name, Preview and the columns that I have added. Is it possible to hide the other columns? I want to perform this out of the box.
Several possibilities.
You can use SharePoint Designer to manipulate the NewForm, EditForm and DisplayForm. Edit the existing form, use CSS to set the out of the box HTML form to hidden, then add a new custom form to the page and remove the columns you don't want to see.
If you don't want to use these columns at all, just delete them in the Library settings
If you don't want to delete the columns, click the parent content type in the Library settings, then edit each column and set it to "hidden"
Check this out: http://sarangasl.blogspot.in/2009/10/hide-column-in-edit-new-or-display-mode.html
I found this solution to be really simple and effective. Very well documented and descriptive.