How to insert a custom view?

Hi,
I have created a ListView on a custom layout page:
<SharePoint:ListView runat="server" ID="ListView1" />
SPWeb web = SPContext.Current.Web;
SPList list = web.Lists["TestList"];
SPView view = list.DefaultView;
try
web.AllowUnsafeUpdates = true;
view.TabularView = false; // hide the left-most column containing checkboxes
view.Update();
finally
web.AllowUnsafeUpdates = false;
ListView1.ListId = list.ID.ToString();
ListView1.ViewId = view.ID.ToString();
I'd like to insert my layout page into the menu in the page header:
How can I insert a menu item to the above menu that would lead to my layout page?
Thanks,
Leszek
Wiki: wbswiki.com

Hi,
if the whole purpose is hiding the checkbox, then you should use JSLink property of the view, instead of creating a new layout page...
The following javascript will hide the checkbox column.
(function () {
var overrideCtx = {};
overrideCtx.Templates = {};
overrideCtx.OnPostRender = postRenderHandler;
SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCtx);
function postRenderHandler(ctx) {
$('td.ms-cellStyleNonEditable, th.ms-headerCellStyleIcon').hide();
Just add the script in js file, deploy in layout folder. Then edit the view page, and refer the js file in JSLink. 
More details on how to configure JSLink can be found in the following links:
http://www.rbradbrook.co.uk/blog/2013/04/14/introduction-to-client-side-rendering-in-sharepoint-2013/
http://www.codeproject.com/Articles/620110/SharePoint-Client-Side-Rendering-List-Views
Thanks,
Sohel Rana
http://ranaictiu-technicalblog.blogspot.com

Similar Messages

  • How to select a custom view in BAPI_MATERIAL_SAVEDATA

    In our company we have defined some CUSTOM views for different materials. I want to select a custom view in the header data but don't see an option. The only options I see are as follows:
    MATERIAL
    IND_SECTOR
    MATL_TYPE
    BASIC_VIEW
    SALES_VIEW
    PURCHASE_VIEW
    MRP_VIEW
    FORECAST_VIEW
    WORK_SCHED_VIEW
    PRT_VIEW
    STORAGE_VIEW
    WAREHOUSE_VIEW
    QUALITY_VIEW
    ACCOUNT_VIEW
    COST_VIEW
    INP_FLD_CHECK
    MATERIAL_EXTERNAL
    MATERIAL_GUID
    MATERIAL_VERSION
    How can I select a view (in BAPI_MATERIAL_SAVEDATA) that's not a standard SAP view?
    Please help!
    Thanks.

    Hi,
    which views do you select in the structure HEADDATA? Do you select STORAGE_VIEW?
    Cheers

  • How to Embed a custom view

    Hi Experts,
    1) I have a requirement to Embed a custom view in the component CRMCMP_BPIDENT. In the place of IBASE component, my custom view needs to be loaded.
    2) Also the result view will be a custom view. which should display list of customers.
    3) Once I select the line in the result list, it should take me to the BP_DETAIL Window.
    Kindly let me know where the links need to be created and component usage details.

    Hi,
    if the whole purpose is hiding the checkbox, then you should use JSLink property of the view, instead of creating a new layout page...
    The following javascript will hide the checkbox column.
    (function () {
    var overrideCtx = {};
    overrideCtx.Templates = {};
    overrideCtx.OnPostRender = postRenderHandler;
    SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCtx);
    function postRenderHandler(ctx) {
    $('td.ms-cellStyleNonEditable, th.ms-headerCellStyleIcon').hide();
    Just add the script in js file, deploy in layout folder. Then edit the view page, and refer the js file in JSLink. 
    More details on how to configure JSLink can be found in the following links:
    http://www.rbradbrook.co.uk/blog/2013/04/14/introduction-to-client-side-rendering-in-sharepoint-2013/
    http://www.codeproject.com/Articles/620110/SharePoint-Client-Side-Rendering-List-Views
    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com

  • Workflow Approval Process: 1)How to insert Custom Data into Windows Workflow database? 2)In workflow Approval Process while creating new request ,how to insert our custom data like approvers ,requester,object info into WF DB?

    hi ,
    here the description about my question.
    1)i am working on windows workflow,we need to implement approval process for my project.
    2)we have multiple approvers for one request,requester,created object information.
    3)now i want to insert and retrieve, created instance information from windows workflow
    database.with all following details 
    i)Workflow instaceId,
    ii)current state of work flow(idle,complete,pending)
    iii)approvers information.
    iv)requester information.
    v)created object information.
    here some of the links, which i am trying for solution:
    https://wf.codeplex.com/wikipage?title=Tracking%20states%20with%20WorkflowApplication[^]
    https://msdn.microsoft.com/en-us/library/ee622977(v=vs.110).aspx[^]
    please answer to my question. if you want to send any examples send me to my email address.
    [email protected]

    Hi,
    According to your description, it seems that your main issue is about customID paramerter in workflow approval prcess.
    About this, please refer to the two samples:
    http://blog.petegoo.com/2010/08/22/workflow-4-email-approval-sample/
    http://cgeers.com/2010/04/10/windows-workflow-in-asp-net/
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How does one clear Custom Views (Administrative Events) in the Event Viewer?

    Windows Logs and Applications and Services Logs have a "clear log" option; however, I am puzzled how to edit/delete Administrative Events?Eighter from Decatur, county seat of Wise (of course it's in Texas)

    Ronnie Vernon said: Hi p010ne
    The Custom View / Administrative Events is a compilation of all the other event logs in the Event Viewer.
    Entries in this log will be removed when the log where the event originated from is cleared.
    Hope this helps.
    Ronnie Vernon MVP
    I thought that was the case; however, I cleared all the other logs! This is an example of an entry in this log: Log Name:      Microsoft-Windows-Dhcpv6-Client/AdminSource:        Microsoft-Windows-DHCPv6-Client
    Date:          1/17/2009 7:52:33 AM
    Event ID:      1001
    Task Category: Address Configuration State Event
    Level:         Error
    Keywords:      
    User:          LOCAL SERVICE
    Computer:      Windows7
    Description:
    Your computer was not assigned an address from the network (by the DHCP Server) for the Network Card with network address 0x000129F558C5.  The following error occurred: 0x79. Your computer will continue to try and obtain an address on its own from the network address (DHCP) server.
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-Windows-DHCPv6-Client" Guid="{6A1F2B00-6A90-4C38-95A5-5CAB3B056778}" />
        <EventID>1001</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>3</Task>
        <Opcode>74</Opcode>
        <Keywords>0x8000000000000000</Keywords>
        <TimeCreated SystemTime="2009-01-17T13:52:33.858398400Z" />
        <EventRecordID>202</EventRecordID>
        <Correlation />
        <Execution ProcessID="1088" ThreadID="864" />
        <Channel>Microsoft-Windows-Dhcpv6-Client/Admin</Channel>
        <Computer>Windows7</Computer>
        <Security UserID="S-1-5-19" />
      </System>
      <EventData>
        <Data Name="HWLength">6</Data>
        <Data Name="HWAddress">000129F558C5</Data>
        <Data Name="StatusCode">121</Data>
      </EventData>
    </Event>
    When I search for "Microsoft-Windows-DHCPv6-Client" I do not find that file?
    OK, I found the entrys in the Microsoft section (DHCPv6-Client) and am able to clear them there! 
    Eighter from Decatur, county seat of Wise (of course it's in Texas)

  • How to create a customized view in SCOM monitoring to view alerts

    Hi All,
    I am trying to create a customized view in SCOM 2012 R2 monitoring for command center team to have the alerts from Server OS, AD, Exchange and few other MPs. I understand that I can use the option "Create by Specific source" and by selecting the
    required sources but I don't want all the alerts from these sources to be listed there but only few alerts which the respective teams want it to be.
    Thanks in advance.
    Regards,
    Srini

    Hi All,
    I am trying to create a customized view in SCOM 2012 R2 monitoring for command center team to have the alerts from Server OS, AD, Exchange and few other MPs. I understand that I can use the option "Create by Specific source" and by selecting the
    required sources but I don't want all the alerts from these sources to be listed there but only few alerts which the respective teams want it to be.
    Thanks in advance.
    Regards,
    Srini
    Hi Srini,
    Based on the above requirement, You want to create a Dashboard view with Specific alerts but not all right ?
    Based on my understanding on your above requirement i created one in my SCOM. Please let me know if this is what you really wanted ?
    For the below you really need to know what are those alerts, ONLY those alerts you want to be displayed in the dashboard.
    Then Go to the Monitoring tab in SCOM and then Right click Active alerts and select New -> Select New Alert view
    When you select new alert view you will need to specify the Resolution state and the Specific alerts you want.
    In the below example i have selected "MSExchange Active sync Alert" as a example. So my goal is here such that only the alerts i have specified from my selection ( "MSExchange Active sync Alert") if it appears in New state will appear
    in this view not all other alerts.
    So for that i just used the below options:
    Resolution state & Alert name
    Resolution state = New
    Alert name = %MSExchange XXXXXXXX%
    Also as of i see there was no option for entering multiple alert names. But i think there is and i am still trying as it accepts some SQL Wild cards. So if any one has an idea what is the wild card what is to be used to mention multiple names in that Name
    view please let me know.
    Gautam.75801

  • How to get a Custom View in CRM 2007

    Hi,
    I have created a new view (SrvTLocation) and I want to replace Service Level Agreements view with the SrvTLocation.
    In the old version, I followed this approach to get the location view
    1. Add SrvTLocation to the SrvTViewSet under the view area "SrvTActionSLA".
    2. Redefine the method "DO_REPLACE_INITIAL_VIEW" of the controller class of "SrvTViewSet", so that it will replace the "SrvTSLA" with "SrvTLocation"
    I dont know how to do it in the new system.
    Please advice me. I will reward points.
    Sreekanth

    Hi Sreekanth
    Have you checked the new CRM 2007 Cookbook.
    I believe it's available from SAP Marketplace. Haven't checked myself but do believe it's there.
    Regards
    Arden
    Reward with points if helpful

  • How to create a custom view in NWA

    Hi ,
    can I get log for my specific business system in NWA .
    Is there any weblog on NWA for XI ??
    Thanks
    KLK

    Hello, KLK!
    Do you have done that?

  • How to add Custom View to GP Runtime Views

    Hi All,
    I would like to add custom view to my GP process.
    In GP runtime mode the numbers you see on left hand side like "run103" "run002" are confusing to users. I would like to have appropriate name/description instead.
    I understand that I can add Custom view to Runtime Views, but when I am editing a process "Add Custom View" button is always disabled.
    Why that button is always disabled?
    How do I define Custom View for a process?
    Thanks,
    Abhay

    Hi Abhay,
    this is a bug in SP7 which is fixed in the last patch. You can download it from the Market Place.
    Best regards,
    David

  • How to insert Query View into a WorkBook

    Hi Experts,
                   Is it possible to  insert a Query View into a workbook template . I know about how to insert Query into a workbook template but I am not aware of how to insert a Query view.Please help me in this regards.
    Thanks & Regards,
    Bala B...

    In ur analyzer u will get the design toolbar. Like u did for inserting query into workbook , same procedure u need to follow here-only difference being instead of query u select ur query view,while creating data provider.
    Steps:
    Goto design mode, b selecting 'design mode icon' in analyzer toolbar.
    Double click on 'analysis grid' icon from ur analyzer toolbar.
    In that create DP(data provider).
    In that give a name for DP and select your query view in that screen.
    Hope it helps.
    let me know any issues
    Regards,
    Rathy

  • Outlook 2013 (how to share Custom "Views" for shared Contacts/Journals)

    Environment:  Office 2013 Client (Office 365 E3)
    I have shared Contacts and Journals with other users.
    I have a custom View for each, how do I share the "View"?

    Hi,
    Custom view won't be shared when you share your Contacts or Journals. You'll need to copy the views you want to share to a pst-file and then share the pst file to others.
    To do this, please refer to the following link and look at the "Method 3: Copy views to a Views_backup.pst" section:
    http://www.outlook-tips.net/how-to/copy-outlook-custom-views/
    Please Note: Since the web site is not hosted by Microsoft, the link may change without
    notice. Microsoft does not guarantee the accuracy of this information.
    You can also refer to the video tutorial at the end of the article for detailed steps.
    Regards,
    Steve Fan
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Call Custom View as a popup

    How to call a custom view from another view in the same UI component?
    I enhanced UI Component BP_HEAD_SEARCH and added a new View which should be opened like a pop up on button click in MainSearchResult view.
    Please advice.

    To show a custom UI component as pop up you need to do the following
    a. Runtime Repostory
    Create a new component usage.
    b. Controller Class
    Create an new attribute in the controller class
    lr_popup type ref to IF_BSP_WD_POPUP.
    In the event handler or when the popup need to be invoked
      DATA : lv_title TYPE string.
      lr_popup = comp_controller->window_manager->create_popup( iv_interface_view_name = 'CustomViewName'"#EC notext
                                                                iv_usage_name = 'UsageName'
                                                                iv_title = lv_title ).
      lr_popup->set_on_close_event( iv_view = me iv_event_name = 'EVENTNAMETOBECALLEDONCLOSING' ).  "#ec notext
      lr_popup->open( ).

  • Outlook 2013 custom view reverting to default at random times

    I have a customer who uses very specific view columns, color coding, and ordering to go with some custom addins. Every couple of months, his default view settings saved under "userdefaultview" will revert to default for no apparent reason.
    Windows updates are not causing this as there is no time correlation. 
    System restore has worked once in the past, but is not working right now.
    User is on Outlook 2013 connected to Exchange 2010 through an onsite server. He only uses one onsite desktop, and remotes in with other devices due to the large amount of customization on his Outlook client.
    Thank you.

    since Outlook 2003, the view settings information is stored in the mailbox or PST file. it may be difficult to determine the root cause because this issue happens every couple of months. the cause may lie with the client side or the server side.
    to work around it, try to back up the custom views to a pst file which we can use to restore the views if this issue occurs. see:
    http://www.outlook-tips.net/how-to/copy-outlook-custom-views/
    after the backup, we can also try starting outlook with outlook /cleanviews and wait to see if it will fix the issue.
    Flynn

  • How to Create a Configuration Manager Console Custom View

    I am trying to create an assembly per the SDK example here:
    https://msdn.microsoft.com/en-us/library/hh948614.aspx
    I have added the assemblies per this article:
    https://social.technet.microsoft.com/Forums/en-US/5d74d30d-295b-4c51-8518-abdabbad731b/console-extension-custom-view-development?forum=configmanagersdk
    Now most of my references resolve but at compile time I get:
    Error 1 'MyCustomView.MyViewDescription' does not implement interface member 'Microsoft.ConfigurationManagement.AdminConsole.IConsoleView.TypeOfView'. 'MyCustomView.MyViewDescription.TypeOfView' cannot implement an interface member because it is
    not public. \MyCustomView\Class2.cs 21 18 MyCustomView
    Error 2 'MyCustomView.MyViewDescription' does not implement interface member 'Microsoft.ConfigurationManagement.AdminConsole.IConsoleView2.TypeOfViewController'. 'MyCustomView.MyViewDescription.TypeOfViewController' cannot implement an interface
    member because it is not public. \MyCustomView\Class2.cs 21 18 MyCustomView
    Error 3 'MyCustomView.MyViewDescription.TypeOfViewController': no suitable method found to override MyCustomView\Class2.cs 23 33 MyCustomView
    Error 4 'MyCustomView.MyViewDescription.TypeOfView': no suitable method found to override MyCustomView\Class2.cs 24 33 MyCustomView
    Error 5 'MyCustomView.MyViewDescription.TryConfigure(ref System.Xml.XmlElement)': no suitable method found to override MyCustomView\Class2.cs 24 109 MyCustomView
    I have been hunting around with a couple of decompilers looking for missing references etc for a few hrs and just can't seem to see what I am missing...
    I have included the code block here - typically of course I would not include multiple classes in the same CS file but for this POC it should be fine...
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Microsoft.ConfigurationManagement.AdminConsole;
    using Microsoft.ConfigurationManagement.AdminConsole.Views.Common;
    using Microsoft.ConfigurationManagement.AdminConsole.Schema;
    using System.Reflection;
    using System.Xml;
    using Microsoft.EnterpriseManagement.UI.WpfViews;
    using Microsoft.ConfigurationManagement.AdminConsole.ConsoleView;
    namespace MyCustomView
    public class MyViewController : OverviewControllerBase { public MyViewController() : base() { } public override void EndInit() { base.EndInit(); this.Content = new Label() { Content = "My Content" }; } }
    public class MyViewDescription : IConsoleView2
    override protected Type TypeOfViewController { get { return typeof(MyViewController); } }
    override protected Type TypeOfView { get { return typeof(Overview); } } public override bool TryConfigure(ref XmlElement persistedConfigurationData) { return false; }
    new public bool TryInitialize(ScopeNode scopeNode, AssemblyDescription resourceAssembly, ViewAssemblyDescription viewAssemblyDescription) { return true; }

    Hi Alfonso,
    I did eventually release the console extension (see screen shot at the bottom of the page
    here).
    It has been a while since I worked on this code but as I remember, once I got the references straightened out (see this thread), a lot of the confusion I had was just understanding that some of the programming that had to be done was in WPF (not WinForm).
     The sample code from Microsoft does work though.
    I never was able to figure out how to tie the "tree node menu item" functionality into the Ribbon (at the top of the SCCM console) so that is still on my TODO list.  
    So, my advice to you is to start with the Microsoft example code (which I did) from the SCCM SDK and if you get compile time errors, look first for the SCCM assembly references (Microsoft.[ConfigurationManagement, ConfigurationManagement.ManagementProvider,
    EnterpriseManagement.UI.Foundation, EnterpriseManagement.UI.WpfViews) and then at the WPF assembly references (PresentationCore, PresentationFramework) for missing class references.
    I hope this information can help you.  Good luck sir! 
    Anthony LaMark

  • How to create a help view for a customized error message

    Hi all,
    Can you guide me how to create a help view for a customized error message, we need to put some suggestions in it so that user can can resolve this issue with this guide. ( the short text is too short to describe all situations via TC:SE91)
    Thanks very much!
    Bruce, Wen

    Hi Bruce,
    Could you brief your concerns again.
    Why don't you maintain long text in message class for long description.
    Regards,
    Ranjith N

Maybe you are looking for

  • Why does firefox change fonts when I am trying to download or get help, click and enter keys are disabled why?

    I recently did a clean install of windows7 after returning from Europe and installed Mozilla firefox being fed up with microsoft and google . Fire fox seemed to be working ok but 7 out of 10 downloads were failing, and it seemed that every ebsite ent

  • Playlist will not update from Itunes to IPOD Mini

    I updated my Ipod mini (v1.4) and Itunes (v6.0.1). Since that time, i cannot update a play list on my Ipod. I added a song that was on a playlist prior to the update that is in the M4P format to Ipod. It lists it under my artists but refuses to accep

  • Rounding to Sales Unit in GATP

    HI! All We are in process of implementing GATP and we have a requirement of rounding the confirmed quantity in APO. The standard Library says that it can be achieved provided you carryout availaibility check from CRM system & you should have ECC defe

  • Printing payement advice note in language other than english

    Dear Expert Users We are trying to print payment advice notes in different local languages. We have maintained the vendor language as the local language(ex: Japanese)and tried printing the payment advice note and its appearing in English. Please note

  • AE to Premiere

    Hi, I am completely new to premiere, so please excuse my lack of knowledge.  Basicallly, I created something in After Effects CS4.  I then exported it as a Adobe Premiere Pro Project...I then opened up Adobe Premiere Pro CS5, tried opening the projec