Content (ex: EjsGrid) is get not notified if datasource is changed

Hello,

I have created a Splitter with 4 (nested )Panes: 1 pane left, 2 in the middle (vertically splitted) and 1 pane right side.

On the left I added as ChildContent a EjsTreeView. In the middle Panes I added 2 EjsGrid. On the right side are some EjsTextBox added.

The TreeView has an  SelectedNode event that set the selected item of the TreeView. The EjsTextBoxes are notified if the selected node in the TreeView is changed...
But the data sources of the two EjsGrids are not reacting! If the datasources are initialized without the selected item propery over the Component OnInitializedAsync method, its not reaticing, too! It seems that the Splitter Panes are not working together with the EjsGrid...

Can you help me? Or is this an known bug?

Greetings,
Bernd
    

2 Replies

NP Narayanasamy Panneer Selvam Syncfusion Team February 20, 2020 12:10 PM UTC

Hi Bernd,


Thanks for contacting Syncfusion support.


Currently we are validating your requirement and will get back to you with further details in two business days. Until then we appreciate your patience.
 

Regards,
Narayanasamy P.
 



NP Narayanasamy Panneer Selvam Syncfusion Team February 24, 2020 05:11 PM UTC

Hi Bernd,

Thanks for your patience. 
We have validated your requirement. Yes, you can update DataSource to grid on demand. We have prepared a sample to resolve your issue. Use RefreshColumns() method to update new changes in grid columns. 
Refer below code snippet to update grid data on treeview NodeSelected event. 
 
<TreeViewEvents TValue="string" NodeSelected="@onNodeSelected"></TreeViewEvents> 
 
public void onNodeSelected() 
    { 
        this.Orders1 = Orders = Enumerable.Range(1, 75).Select(x => new Order() 
        { 
            OrderID = 10001 + x, 
            CustomerID = (new string[] { "Customer ID1", "Customer ID2", "Customer ID3", "Customer ID4", "Customer ID5" })[new Random().Next(5)], 
            Freight = 2.1 * x, 
            OrderDate = DateTime.Now.AddDays(-x), 
        }).ToList(); ; 
        textBoxObj.Value = "new value"; 
        ddlObj.DataSource = Games; 
        gridObj.RefreshColumns(); 
    } 
For your convenience we have prepared a demo sample: https://www.syncfusion.com/downloads/support/forum/151720/ze/BlazorAppvew1581036765  
Kindly let us know whether the provided suggestion is resolved your issue. 
Regards,
Narayanasamy P.
 


Loader.
Up arrow icon