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. Image for the cookie policy date

New row sticks to the bottom after updating values

I have an SfDataGrid on which I add rows using the AddNewRow feature and handling the AddNewRowInitiating event. However, any time I update the cell values on the new row, it gets automatically stuck to the bottom after I click anywhere else on the form (to confirm the new row and add the data to the data source). However, I'm looking for the newly added row to stick to the top of the grid instead of the bottom, since I have a large amount of rows on the data source. 

I have tried both setting NewItemPlaceholderPosition to AtBeginning and AddNewRowPosition to FixedTop but the unwanted behaviour is persisting. 

Is there any method or property that I am seemingly missing, that changes that behaviour?

5 Replies

FP Farjana Parveen Ayubb Syncfusion Team August 21, 2019 11:55 AM UTC

Hi Bill, 
  
Thank you for using Syncfusion controls. 
  
You can add the new record at the first row of the SfDataGrid by set the NewItemPlaceHolder as AtBeginning for SfDataGrid and its works fine at our end, please refer the below sample and video link which we have tested on our end. 
  
  
  
If still you are facing the same issue, please revert us with more details on replication procedure/code example. Also if possible, please revert us with the modified sample. It will helps us to investigate further and provide earlier prompt solution.  
   
Note: NewItemPlaceHorder is not works for DataTable it’s a limitation. 
 
Please let us know, if you require further assistance on this.  
   
Regards,  
Farjana Parveen A  



BI Bill August 22, 2019 05:13 AM UTC

I am using a DataTable because I have to deal with a large amount of dynamic data (think ~ 1200 rows on each grid), so there's my answer, I think. Is the difference between the DataTable source and an ObservableCollection data source as demonstrated in the sample that the data in the former case is read at runtime from an external database, while in the latter case it's local data? 


FP Farjana Parveen Ayubb Syncfusion Team August 23, 2019 11:50 AM UTC

 
Hi Bill, 
 
Thank you for your update. 
 
We regret to inform you that we don’t have a NewItemPlaceHolder support for DataTable collection in SfDataGrid. Currently analyzing feasibility to achieve this support with high priority and we will provide the further details on  27th August, 2019. 
  
We will appreciate your patience until then. 
  
Regards, 
Farjana Parveen A 
 



FP Farjana Parveen Ayubb Syncfusion Team August 27, 2019 11:26 AM UTC

Hi Bill,  
  
We have considered to provide support for “NewItemPlaceHolder support for DataTable collection” in WinForms SfDataGrid and logged feature request for the same. We will implement this feature in any of our upcoming release.   
  
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. We appreciate your patience until then.  
  
Thank you for requesting this feature and helping us define it. We are always trying to make our products better and feature requests like yours are a key part of our product growth efforts.  
  
 
 Note: The provided feedback link is private, and you need to login to view this feedback. 
 
If you have any more specification/suggestions to the feature request, you can add it as a comment in the portal and cast your vote to make it count.  
  
Regards,  
Farjana Parveen A 



FP Farjana Parveen Ayubb Syncfusion Team December 18, 2019 10:46 AM UTC

Hi Graham, 
 
We are glad to announce that our Essential Studio 2019 Volume 4 Release version 17.4.0.39 is rolled out with your requested feature “Provide the support for NewItemPlaceHolder for DataTable collection” and is available for download under the following link.  
 

 
The position of the newly added item can now be customized for DataTable collection also using NewItemPlaceholderPosition property. 
 
Please refer to the user guide documentation, 
 
Please find the code example below, 
C# 
this.datagrid.NewItemPlaceholderPosition = NewItemPlaceholderPosition.AtBeginning; 
 
XAML 
                       AddNewRowPosition="Top" 
                       NewItemPlaceholderPosition="AtBeginning"                             
                       ItemsSource="{Binding OrderInfoCollection }"> 
 
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.  
 
Regards, 
Farjana Parveen A 


Loader.
Live Chat Icon For mobile
Up arrow icon