+ Start a Discussion

new question

Hi All,

I am new to salesforce. Got an requirement to create a Visual force page in lightning for list-view of Custom object and also, i should be able to perform in-line editing on their list views.

Any help is highly appreciated.
Deepak Kumar SharmaDeepak Kumar Sharma
you can also create a component and try the below syntax for creating listview in lightning :-
<lightning:listView aura:id="listViewAccounts"
                              rows="5" showActionBar="false" 
                              showRowLevelActions="false" />
If it really helps you please select this as best answere. happy coding :)
SandhyaSandhya (Salesforce Developers) 

I would suggest you refer below blog for the same.

Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
Best Regards
Thanks for the reply guys.

I have used component and APEX class to create the VF page. It is working to a level, but inline - editing and lightning look is not displaying in salesforce page. I stuck up with below code and not able to proceed further.

VF Page:

<apex:page lightningStylesheets="true">
              <c:Test_EnhancedListcomponent listViewName="CUSTOM LIST VIEW NAME"/>   


<apex:component controller="RequestListViewController">  
  <apex:attribute name="listViewName" type="String" required="true" 
    description="The name of the listview." assignTo="{!listName}"/>   
  <apex:enhancedList height="400" rowsPerPage="25" id="RequestList"
    listId="{!listId}" rendered="{!listId != null}" />
  <apex:outputText rendered="{!listId == null}" value="Could not find requewed ListView: '{!listName}'. Please contact your administrator."/>

APEX Class:

public with sharing class RequestListViewController {

  public String listName {
    set {
        listName = value;
        String qry = 'SELECT Name FROM Request__C LIMIT 1';
        ApexPages.StandardSetController ssc = 
            new ApexPages.StandardSetController(Database.getQueryLocator(qry));
        List<SelectOption> allViews = ssc.getListViewOptions();
        for (SelectOption so : allViews) {
          if (so.getLabel() == listName) {
            // for some reason, won't work with 18 digit ID
            listId = so.getValue().substring(0,15);
  public String listId {get;set;}