We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Dynamically add row at the top, below the header row

Thread ID:

Created:

Updated:

Platform:

Replies:

131227 Jun 29,2017 07:18 AM Jul 2,2017 03:12 AM UWP 1
loading
Tags: SfTreeGrid
Siju.P.Sukumar
Asked On June 29, 2017 07:18 AM

Hi,

  I just wanted to add  an empty row  dynamically at the top of the sfTreegrid, below the header row. This is to filter the sfTreeGrid values. How can I do this?

There is any  other option in sfTreeGrid to display an empty row at top, just like unboud row in sfDataGRid?

Thanks&Regards,
Siju

Muthukumar Kalyanasundaram [Syncfusion]
Replied On July 2, 2017 03:12 AM

Hi Siju, 
 
Thank you for contacting Syncfusion support. 
 
We have checked your query. Please find the response from below table. 
 
 
Query 1: 
 To filter the sfTreeGrid values. How can I do this? 
 
 
If you want to filter the records in SfTreeGrid, you can achieve by setting SfTreeGrid.View.Filter delegate and also you can refresh the view by calling SfTreeGrid.View.RefreshFilter method.  
Could you please refer the below code, 
 
Code Snippet: 
 
private void OnFilterChanged() 
{ 
    var viewModel = this.DataContext as EmployeeRepository; 
    if (treeGrid.View != null) 
    { 
        treeGrid.View.Filter = viewModel.FilerRecords; 
        treeGrid.View.RefreshFilter(); 
    } 
} 
 
 
For more details about filtering in SfTreeGrid, you can refer the below link, 
 
 
Query 2: 
There is any  other option in sfTreeGrid to display an empty row at top, just like unbound row in sfDataGRid? 
 
 
If you want to insert the empty row at top position of SfTreeGrid, you can use the underlying collection to insert the new row.  Could you please refer the below code, 
 
Code Snippet: 
 
private void Button_Click(object sender, RoutedEventArgs e) 
{ 
    view = (this.treeGrid.DataContext as EmployeeRepository).EmployeeDetails; 
    view.Insert(0, new Employee() { }); 
} 
 
 
 
 
Please let us know if you have any query. 
 
Regards, 
Muthukumar K 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;