Data Manager Usage Scenarios with Data Pager

We have successfully created custom data adaptors that integrate with ViewModels that flow gRPC requests over to backing services.

Integration with Data Grid is flawless, as well as with Query Builder.  Excellent work Sf Team.

I am wondering how we can use just the Data Manager with Data Pager with the List View Control.  Data Pager seems to be integrated with Data Grid in Blazor but not in other UI SF Stacks.  

Also aside from List View and Data Grid are there any other SF Blazor controls that work with Data Manager?

 

5 Replies 1 reply marked as answer

VN Vignesh Natarajan Syncfusion Team September 23, 2020 07:04 AM UTC

Hi John,  
 
Thanks contacting Syncfusion support.  
 
Query: “I am wondering how we can use just the Data Manager with Data Pager with the List View Control.  Data Pager seems to be integrated with Data Grid in Blazor but not in other UI SF Stacks. 
 
Currently we do not have support for Pager as a standalone component in Blazor. We have considered the reported query “Data Pager seems to be integrated with Data Grid in Blazor but not in other UI SF Stacks” as feature and added this feature request to our database. We are always trying to make our products better and feature requests like yours are a key part of our product growth efforts. At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest. We will let you know when this feature is implemented. 
 
You can also communicate with us regarding the open features any time using our Feature Report page. 
 
 
Till then we appreciate your patience.  
 
Query: “Also aside from List View and Data Grid are there any other SF Blazor controls that work with Data Manager? 
 
DataManager component can be used with all the data binding components like TreeGrid, TreeView, Schedule, Charts, Pivot table and editor components like DropDownList, ComboBox, AutoComplete , MultiSelect etc. DataManager component is used to fetch data from different service and bind it to corresponding  component.  
 
Kindly get back to us if you have further queries.     
 
Regards, 
Vignesh Natarajan 



JO John September 23, 2020 01:16 PM UTC

Thank you for your prompt reply. 


With every control scenario that you have listed we would need at some level to have the ability to set skip/take, search filtering as well as invoke insert, update and delete. 

Given that you have integrated the Data Pager within the Data Grid it appears we will need to roll our own so how would you recommend that we are to handle this critical need?

Is there any documentation that you can provide us on how to control paging, sorting and searching against the Data Manager outside of a Data Grid?   

This request is critical for us adopting Sync Fusion Blazor controls. 

The following is how we depict this to work, please correct anything you feel is not representative of your current data integration approach.  










JO John September 23, 2020 01:58 PM UTC

Do all controls  such as ListView, TreeGrid, TreeView, Schedule, Charts, Pivot tableDropDownList, ComboBox, AutoComplete , MultiSelect support the Query property like DataGrid

If so than it would appear our solution would update a local instance of a Query, setting it's skip and take via our own pager.  Since we flow the total count of records back to the data adaptor via our viewmodels, we have that detail even if it is not surfaced through Data Manager so we can show total records and pages.  

Is that I we should roll our own pager?     



JO John September 23, 2020 02:46 PM UTC

Or if not Query is it that we need to create a DataManagerRequest and pass that into ExecuteQuery<T> on a given DataManager ?

ExecuteQuery<T>(DataManagerRequest)


Are there any examples that you can share that show working with DataManagerRequest and the DataManager Execute function ?


VN Vignesh Natarajan Syncfusion Team September 24, 2020 11:53 AM UTC

Hi John,  
 
Thanks for the update. 
 
Query: “Is there any documentation that you can provide us on how to control paging, sorting and searching against the Data Manager outside of a Data Grid?  
 
Refer our UG documentation and online demo using the Data manager with custom binding. Refer the below links for your reference 
 
 
 
Please get back to us if you have further queries.  
 
Query: “Do all controls  such as ListView, TreeGrid, TreeView, Schedule, Charts, Pivot tableDropDownList, ComboBox, AutoComplete , MultiSelect support the Query property like DataGrid && Is that I we should roll our own pager? 
 
Yes. All the databinding controls will have Query properties based on which the datasource can be handled for Paging, Filtering, Sorting etc. We will implement a standalone Pager component in any of our upcoming releases. Once it is rolled out you can integrate with other components to perform data operations and display pager in specific controls.   
 
Query: “Are there any examples that you can share that show working with DataManagerRequest and the DataManager Execute function ? 
 
As per your request we have prepared a sample using DataManagerRequest (i.e.) CustomAdaptor with Execute method. Refer the below code example.  
 
<SfGrid TValue="Order" AllowSorting="true" AllowFiltering="true" AllowPaging="true"> 
    <SfDataManager @ref="DataManagerRef" AdaptorInstance="@typeof(CustomAdaptor)" Adaptor="Adaptors.CustomAdaptor"></SfDataManager> 
. .  .  . . . . 
</SfGrid> 
  
@code{ 
    public static List<Order> Orders { getset; } 
    SfDataManager DataManagerRef { getset; } 
. . . .  
    public async Task Data() 
    { 
        //generate our own query and return data.  
        object t = await DataManagerRef.ExecuteQuery<Order>(new Query().Skip(5).Take(4)); 
        //deserialize the object to List of Objects.  
        var data = JsonConvert.DeserializeObject<List<Order>>(JsonConvert.SerializeObject(t));  
//to fetch the data externally like stand alone datamanager  component 
    } 
    // Implementing custom adaptor by extending the DataAdaptor class 
    public class CustomAdaptor : DataAdaptor 
    { 
        // Performs data Read operation 
        public override object Read(DataManagerRequest dm, string key = null) 
        { 
            IEnumerable<Order> DataSource = Orders; 
            int count = DataSource.Cast<Order>().Count(); 
            DataSource = DataOperations.Execute<Order>(DataSource, dm); 
            return dm.RequiresCounts ? new DataResult() { Result = DataSource, Count = count } : (object)DataSource; 
        } 
    } 
 
 
Kindly download the sample from below  
 
 
Please get back to us if you have further queries.    
 
Regards, 
Vignesh Natarajan 


Marked as answer
Loader.
Up arrow icon